Cron timezone error after updating Rockstor

I recently updated Rockstor and since then my scheduled tasks don’t work anymore. Cron sends the following mail (for every task to be executed):

Traceback (most recent call last):
File “/opt/rockstor/.venv/bin/st-snapshot”, line 3, in
from scripts.scheduled_tasks.snapshot import main
File “/opt/rockstor/src/rockstor/scripts/scheduled_tasks/snapshot.py”, line 25, in
from django.utils.timezone import utc
ImportError: cannot import name ‘utc’ from ‘django.utils.timezone’ (/opt/rockstor/.venv/lib/python3.11/site-packages/django/utils/timezone.py)

Any ideas how to solve this? I have already tried to delete all tasks and make new ones, but I still get the same errors.

@sanderweel hello again. Can you tell us to which version you have updated and which OpenSUSE Leap version (or are you running on TW)?

There was an issue opened and closed with this PR that addresses the deprecated function you’re showing above:

But this was done on the testing branch.

2 Likes

I am using the testing branch. Leap 15.6 and Rockstor 5.5.0.0.

@sanderweel, it seems that you identified a missed piece of the correction that was implented earlier (see above).

There is now a new issue created on github by @phillxnet that will address this, hopefully soon.

Sorry for the current inconvenience.

1 Like