Stacktrace seems to indicate that it's trying to serialize non-serializable data:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/flask/app.py", line 2070, in wsgi_app
2021/08/24 17:48:54 Events tried:
response = self.full_dispatch_request()
- firebase-auth (PASSED)
File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/flask/app.py", line 1515, in full_dispatch_request
- firebase-db1 (PASSED)
rv = self.handle_user_exception(e)
- firebase-db2 (PASSED)
File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request
rv = self.dispatch_request()
File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "/home/runner/work/functions-framework-python/functions-framework-python/src/functions_framework/__init__.py", line 143, in view_func
function(data, context)
File "/home/runner/work/functions-framework-python/functions-framework-python/tests/conformance/main.py", line 20, in write_legacy_event
json.dumps(
File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/json/__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/json/encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/json/encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "/opt/hostedtoolcache/Python/3.8.11/x64/lib/python3.8/json/encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type bytes is not JSON serializable
The
write_legacy_eventconformance test has started failing on themasterbranch: https://github.com/GoogleCloudPlatform/functions-framework-python/runs/3414035673functions-framework-python/tests/conformance/main.py
Lines 18 to 31 in e79fc74
Stacktrace seems to indicate that it's trying to serialize non-serializable data:
Seems likely that
datais now being sent as bytes here and needs decoded first.