0

I'm trying to animate a layer, and to do that I want to use the function animation_datetime(). But when I use it, I get the error Expression is invalid and the reason it gives me is:

Eval Error: descriptor 'strftime' for 'datetime.date' objects doesn't apply to a 'NoneType' object:

    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/qgis/core/additions/qgsfunction.py", line 72, in func
        return self.function(values, **kwvalues)
      File "/home/amin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/timemanager/timemanager_obj.py", line 106, in animation_datetime
        return time_util.datetime_to_str(control.getTimeLayerManager().getCurrentTimePosition(),
      File "/home/amin/.local/share/QGIS/QGIS3/profiles/default/python/plugins/timemanager/utils/time_util.py", line 264, in datetime_to_str
        return datetime.strftime(dt, fmt)
    TypeError: descriptor 'strftime' for 'datetime.date' objects doesn't apply to a 'NoneType' object

The expression that I have in the Symbology / Geometry Generator is literally just animation_datetime()

I've made sure to enable Dynamic Temporal Controller in the Temporal tab, and to activate the animated temporal navigation Temporal tab Expression is invalid enter image description here

2
  • There is no "animation_datetime" function available in QGIS. Please see docs.qgis.org/3.34/en/docs/user_manual/expressions/…. Commented Nov 18, 2024 at 14:05
  • I just realized that I installed TimeManager plugin as I was testing things, but I just installed it now. How can I interact with the animations? Which functions can I use? Commented Nov 18, 2024 at 14:13

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.