Closed Uninen closed 2 years ago
hi, @Uninen
I could not reproduce your case, but I think it's got to do something with the following parameters in settings.py
:
TIME_ZONE = 'UTC'
USE_TZ = True
Could you tell me what values are you using here, please?
While trying to figure out root cause I've fixed another bug in the Storage backend's .stat()
implementation so please upgrade to 3.3.0:
pip install django-minio-backend==3.3.0
I'm afraid I don't have access to the environment anymore bc we needed to ditch Minio altogether, but I think you're right, the issue might have been in the timezone settings. The settings at the time were:
TIME_ZONE = "Europe/Helsinki"
USE_TZ = False
Feel free to close this issue if you can't easily repro it as it doesn't affect our project anymore and I feel bad as well for not being able to help debugging!
Thank You for your work 🙏
It was indeed related to USE_TZ
. The official Minio Client always returns TZ-aware datetime objects and if you turn off TZ in Django, then you run into this problem, b/c TZ-aware and TZ-unaware objects cannot be compared.
I've pushed v3.3.2 which resolves this issue. Thanks, @Uninen !
I think this might be user error but I'm having hard time figuring out how to debug this.
I have latest django-minio (3.2.1) running on Django 3.2 and connected to minio (version 2021-11-09T03:21:45Z) that is running behind Traefik proxy.
The connection, bucket creation and initial collectstatic works ok, but when I run collectstatic again I get following error:
Using following relevant settings:
When I delete the uploaded staticfiles + the bucket and re-run collectatic the command works again. (But only for the first time.)