ShaneIsrael / fireshare

Self host your media and share with unique links
GNU General Public License v3.0
653 stars 40 forks source link

"TypeError: Only timezones from the pytz library are supported" after upgrading from version v1.2.8 to v1.2.9 via Docker #193

Closed InfernalError closed 1 year ago

InfernalError commented 1 year ago

Describe the bug "TypeError: Only timezones from the pytz library are supported" after upgrading from version v1.2.8 to v1.2.9 via docker. Rolling back by using the v1.2.8 tag resolves the issue.

To Reproduce Steps to reproduce the behavior: Run a docker pull using the latest tag or v1.2.9

Expected behavior The docker container starts successfully

Docker Log Traceback (most recent call last): File "/usr/local/bin/gunicorn", line 8, in <module> sys.exit(run()) File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 67, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 231, in run super().run() File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 72, in run Arbiter(self).run() File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 58, in __init__ self.setup(app) File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 118, in setup self.app.wsgi() File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 58, in load return self.load_wsgiapp() File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 412, in import_app app = app(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/fireshare/__init__.py", line 151, in create_app init_schedule(app.config['SCHEDULED_JOBS_DATABASE_URI'], File "/usr/local/lib/python3.9/site-packages/fireshare/schedule.py", line 19, in init_schedule scheduler.add_job(fireshare_scan, 'interval', minutes=mins_between_scan, id='fireshare_scan', replace_existing=True) File "/usr/local/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 420, in add_job 'trigger': self._create_trigger(trigger, trigger_args), File "/usr/local/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 921, in _create_trigger return self._create_plugin_instance('trigger', trigger, trigger_args) File "/usr/local/lib/python3.9/site-packages/apscheduler/schedulers/base.py", line 906, in _create_plugin_instance return plugin_cls(**constructor_kwargs) File "/usr/local/lib/python3.9/site-packages/apscheduler/triggers/interval.py", line 38, in __init__ self.timezone = astimezone(timezone) File "/usr/local/lib/python3.9/site-packages/apscheduler/util.py", line 93, in astimezone raise TypeError('Only timezones from the pytz library are supported') TypeError: Only timezones from the pytz library are supported

Additional context

ShaneIsrael commented 1 year ago

interesting. looking into this since i just updated the the container today but the change that went through should not have caused this.

InfernalError commented 1 year ago

I don't have a whole lot of insight to add, but pulling v1.2.8 does resolve the issue in my environment.

ShaneIsrael commented 1 year ago

Looks to be a bug in later version of apscheduler, just odd that I've never seen the issue before since I've had the version of apscheduler that I use pinned. I'm testing a fix now, I'll let you know if the issue is resolved.

ShaneIsrael commented 1 year ago

I believe I have resolved the issue. a new image for v1.2.9 is building now. Re-pull the image when its done building and let me know. Should be done in about 30-40 minutes from the time of this comment.

InfernalError commented 1 year ago

I re-pulled v1.2.9 and it works now 👍