firebase / firebase-functions-python

Apache License 2.0
136 stars 22 forks source link

Time data format error #185

Closed scottynoshotty closed 5 months ago

scottynoshotty commented 6 months ago

I have a collection of v2 Python Firebase Cloud Functions communicating via Pubsub. I am intermittently (maybe 5% of the time) seeing cloud functions triggered by Pubsub failing upon receiving the Pubsub message with this error

INFO 2024-03-26T04:34:13.202895Z https://update-pending-post-on-blob-finalized-ikiqidi4rq-uc.a.run.app/?__GCP_CloudEventsMode=CUSTOM_PUBSUB_projects%2Fclaptrap-project%2Ftopics%2Fblob-finalized
DEFAULT 2024-03-26T04:34:13.024333Z raise ValueError("time data %r does not match format %r" %
DEFAULT 2024-03-26T04:34:13.024328Z File "/layers/google.python.runtime/python/lib/python3.11/_strptime.py", line 349, in _strptime
DEFAULT 2024-03-26T04:34:13.024324Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DEFAULT 2024-03-26T04:34:13.024319Z tt, fraction, gmtoff_fraction = _strptime(data_string, format)
DEFAULT 2024-03-26T04:34:13.024314Z File "/layers/google.python.runtime/python/lib/python3.11/_strptime.py", line 567, in _strptime_datetime
DEFAULT 2024-03-26T04:34:13.024309Z ^^^^^^^^^^^^^^^^^^^^^^
DEFAULT 2024-03-26T04:34:13.024305Z time = _dt.datetime.strptime(
DEFAULT 2024-03-26T04:34:13.024301Z File "/layers/google.python.pip/pip/lib/python3.11/site-packages/firebase_functions/pubsub_fn.py", line 108, in _message_handler
DEFAULT 2024-03-26T04:34:13.024296Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^
DEFAULT 2024-03-26T04:34:13.024292Z return _message_handler(func, raw)
DEFAULT 2024-03-26T04:34:13.024288Z File "/layers/google.python.pip/pip/lib/python3.11/site-packages/firebase_functions/pubsub_fn.py", line 184, in on_message_published_wrapped
DEFAULT 2024-03-26T04:34:13.024282Z function(event)
DEFAULT 2024-03-26T04:34:13.024278Z File "/layers/google.python.pip/pip/lib/python3.11/site-packages/functions_framework/__init__.py", line 178, in view_func
DEFAULT 2024-03-26T04:34:13.024273Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DEFAULT 2024-03-26T04:34:13.024268Z return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
DEFAULT 2024-03-26T04:34:13.024263Z File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
DEFAULT 2024-03-26T04:34:13.024258Z ^^^^^^^^^^^^^^^^^^^^^^^
DEFAULT 2024-03-26T04:34:13.024254Z rv = self.dispatch_request()
DEFAULT 2024-03-26T04:34:13.024250Z File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
DEFAULT 2024-03-26T04:34:13.024244Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
DEFAULT 2024-03-26T04:34:13.024239Z rv = self.handle_user_exception(e)
DEFAULT 2024-03-26T04:34:13.024233Z File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 1486, in full_dispatch_request
DEFAULT 2024-03-26T04:34:13.024225Z ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERROR 2024-03-26T04:34:13.024219Z Traceback (most recent call last): File "/layers/google.python.pip/pip/lib/python3.11/site-packages/flask/app.py", line 2190, in wsgi_app response = self.full_dispatch_request()
exaby73 commented 5 months ago

Looks like a duplicate of https://github.com/firebase/firebase-functions-python/issues/160. Closing in favor of that issue