Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Object of type date is not JSON serializable : Admin API patch method #1590

Closed
1ly1mk opened this issue Mar 10, 2024 · 5 comments · Fixed by #1605
Closed

TypeError: Object of type date is not JSON serializable : Admin API patch method #1590

1ly1mk opened this issue Mar 10, 2024 · 5 comments · Fixed by #1605
Labels
bug Something isn't working
Milestone

Comments

@1ly1mk
Copy link

1ly1mk commented Mar 10, 2024

Description
While using patch API through postman, gives "TypeError: Object of type date is not JSON serializable" error.

Steps to Reproduce

Send patch/put request to admin/configure endpoint

Expected behavior
It should successfully patch

Screenshots/Tracebacks
2024-03-05 23:28:49 START /entrypoint.sh
2024-03-05 23:28:49 Trying to generate openapi.yml
2024-03-05 23:28:59 Generating /pygeoapi/local.openapi.yml
2024-03-05 23:28:59 Done
2024-03-05 23:28:59 openapi.yml generated continue to pygeoapi
2024-03-05 23:28:59 make SCRIPT_NAME empty from /
2024-03-05 23:28:59 Start gunicorn name=pygeoapi on 0.0.0.0:80 with 4 workers and SCRIPT_NAME=
2024-03-07 00:07:07 START /entrypoint.sh
2024-03-07 00:07:07 Trying to generate openapi.yml
2024-03-07 00:07:29 Generating /pygeoapi/local.openapi.yml
2024-03-07 00:07:29 Done
2024-03-07 00:07:30 openapi.yml generated continue to pygeoapi
2024-03-07 00:07:30 make SCRIPT_NAME empty from /
2024-03-07 00:07:30 Start gunicorn name=pygeoapi on 0.0.0.0:80 with 4 workers and SCRIPT_NAME=
2024-03-07 01:49:29 [2024-03-06T20:19:29Z] {/usr/local/lib/python3.10/dist-packages/flask/app.py:828} ERROR - Exception on /admin/config [PUT]
2024-03-05 23:29:01 [2024-03-05 17:59:01 +0000] [1] [INFO] Starting gunicorn 20.1.0
2024-03-05 23:29:01 [2024-03-05 17:59:01 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
2024-03-05 23:29:01 [2024-03-05 17:59:01 +0000] [1] [INFO] Using worker: gevent
2024-03-05 23:29:01 [2024-03-05 17:59:01 +0000] [11] [INFO] Booting worker with pid: 11
2024-03-05 23:29:01 [2024-03-05 17:59:01 +0000] [12] [INFO] Booting worker with pid: 12
2024-03-05 23:29:01 [2024-03-05 17:59:01 +0000] [13] [INFO] Booting worker with pid: 13
2024-03-05 23:29:01 [2024-03-05 17:59:01 +0000] [14] [INFO] Booting worker with pid: 14
2024-03-06 00:31:00 [2024-03-05 19:01:00 +0000] [1] [INFO] Handling signal: term
2024-03-06 00:31:01 [2024-03-05 19:01:01 +0000] [11] [INFO] Worker exiting (pid: 11)
2024-03-06 00:31:01 [2024-03-05 19:01:01 +0000] [13] [INFO] Worker exiting (pid: 13)
2024-03-06 00:31:01 [2024-03-05 19:01:01 +0000] [14] [INFO] Worker exiting (pid: 14)
2024-03-06 00:31:01 [2024-03-05 19:01:01 +0000] [12] [INFO] Worker exiting (pid: 12)
2024-03-06 00:31:04 [2024-03-05 19:01:04 +0000] [1] [INFO] Shutting down: Master
2024-03-07 00:07:31 [2024-03-06 18:37:31 +0000] [1] [INFO] Starting gunicorn 20.1.0
2024-03-07 00:07:31 [2024-03-06 18:37:31 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
2024-03-07 00:07:31 [2024-03-06 18:37:31 +0000] [1] [INFO] Using worker: gevent
2024-03-07 00:07:31 [2024-03-06 18:37:31 +0000] [11] [INFO] Booting worker with pid: 11
2024-03-07 00:07:31 [2024-03-06 18:37:31 +0000] [12] [INFO] Booting worker with pid: 12
2024-03-07 00:07:31 [2024-03-06 18:37:31 +0000] [13] [INFO] Booting worker with pid: 13
2024-03-07 00:07:31 [2024-03-06 18:37:31 +0000] [14] [INFO] Booting worker with pid: 14
2024-03-07 01:49:29 Traceback (most recent call last):
2024-03-07 01:49:29 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1463, in wsgi_app
2024-03-07 01:49:29 response = self.full_dispatch_request()
2024-03-07 01:49:29 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 872, in full_dispatch_request
2024-03-07 01:49:29 rv = self.handle_user_exception(e)
2024-03-07 01:49:29 File "/usr/local/lib/python3.10/dist-packages/flask_cors/extension.py", line 176, in wrapped_function
2024-03-07 01:49:29 return cors_after_request(app.make_response(f(*args, **kwargs)))
2024-03-07 01:49:29 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 870, in full_dispatch_request
2024-03-07 01:49:29 rv = self.dispatch_request()
2024-03-07 01:49:29 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 855, in dispatch_request
2024-03-07 01:49:29 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
2024-03-07 01:49:29 File "/pygeoapi/pygeoapi/flask_app.py", line 494, in admin_config
2024-03-07 01:49:29 return get_response(admin_.put_config(request))
2024-03-07 01:49:29 File "/pygeoapi/pygeoapi/api.py", line 211, in inner
2024-03-07 01:49:29 return func(cls, req_out)
2024-03-07 01:49:29 File "/pygeoapi/pygeoapi/admin.py", line 242, in put_config
2024-03-07 01:49:29 self.write(data)
2024-03-07 01:49:29 File "/pygeoapi/pygeoapi/admin.py", line 115, in write
2024-03-07 01:49:29 self.write_config(config)
2024-03-07 01:49:29 File "/pygeoapi/pygeoapi/admin.py", line 133, in write_config
2024-03-07 01:49:29 patch = make_patch(conf, raw_conf)
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 175, in make_patch
2024-03-07 01:49:29 return JsonPatch.from_diff(src, dst, pointer_cls=pointer_cls)
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 639, in from_diff
2024-03-07 01:49:29 builder._compare_values('', None, src, dst)
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:49:29 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:49:29 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:49:29 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:49:29 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:49:29 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:49:29 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:49:29 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:49:29 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:49:29 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:49:29 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:49:29 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 897, in _compare_values
2024-03-07 01:49:29 elif self.dumps(src) == self.dumps(dst):
2024-03-07 01:49:29 File "/usr/lib/python3.10/json/init.py", line 231, in dumps
2024-03-07 01:49:29 return _default_encoder.encode(obj)
2024-03-07 01:49:29 File "/usr/lib/python3.10/json/encoder.py", line 199, in encode
2024-03-07 01:49:29 chunks = self.iterencode(o, _one_shot=True)
2024-03-07 01:49:29 File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode
2024-03-07 01:49:29 return iterencode(o, 0)
2024-03-07 01:49:29 File "/usr/lib/python3.10/json/encoder.py", line 179, in default
2024-03-07 01:49:29 raise TypeError(f'Object of type {o.class.name} '
2024-03-07 01:49:29 TypeError: Object of type date is not JSON serializable
2024-03-07 01:57:12 [2024-03-06T20:27:12Z] {/usr/local/lib/python3.10/dist-packages/flask/app.py:828} ERROR - Exception on /admin/config [PATCH]
2024-03-07 01:57:12 Traceback (most recent call last):
2024-03-07 01:57:12 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1463, in wsgi_app
2024-03-07 01:57:12 response = self.full_dispatch_request()
2024-03-07 01:57:12 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 872, in full_dispatch_request
2024-03-07 01:57:12 rv = self.handle_user_exception(e)
2024-03-07 01:57:12 File "/usr/local/lib/python3.10/dist-packages/flask_cors/extension.py", line 176, in wrapped_function
2024-03-07 01:57:12 return cors_after_request(app.make_response(f(*args, **kwargs)))
2024-03-07 01:57:12 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 870, in full_dispatch_request
2024-03-07 01:57:12 rv = self.dispatch_request()
2024-03-07 01:57:12 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 855, in dispatch_request
2024-03-07 01:57:12 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
2024-03-07 01:57:12 File "/pygeoapi/pygeoapi/flask_app.py", line 497, in admin_config
2024-03-07 01:57:12 return get_response(admin
.patch_config(request))
2024-03-07 01:57:12 File "/pygeoapi/pygeoapi/api.py", line 211, in inner
2024-03-07 01:57:12 return func(cls, req_out)
2024-03-07 01:57:12 File "/pygeoapi/pygeoapi/admin.py", line 300, in patch_config
2024-03-07 01:57:12 self.write(config)
2024-03-07 01:57:12 File "/pygeoapi/pygeoapi/admin.py", line 115, in write
2024-03-07 01:57:12 self.write_config(config)
2024-03-07 01:57:12 File "/pygeoapi/pygeoapi/admin.py", line 133, in write_config
2024-03-07 01:57:12 patch = make_patch(conf, raw_conf)
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 175, in make_patch
2024-03-07 01:57:12 return JsonPatch.from_diff(src, dst, pointer_cls=pointer_cls)
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 639, in from_diff
2024-03-07 01:57:12 builder._compare_values('', None, src, dst)
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:57:12 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:57:12 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:57:12 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:57:12 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:57:12 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:57:12 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:57:12 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:57:12 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:57:12 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:57:12 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:57:12 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 897, in _compare_values
2024-03-07 01:57:12 elif self.dumps(src) == self.dumps(dst):
2024-03-07 01:57:12 File "/usr/lib/python3.10/json/init.py", line 231, in dumps
2024-03-07 01:57:12 return _default_encoder.encode(obj)
2024-03-07 01:57:12 File "/usr/lib/python3.10/json/encoder.py", line 199, in encode
2024-03-07 01:57:12 chunks = self.iterencode(o, _one_shot=True)
2024-03-07 01:57:12 File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode
2024-03-07 01:57:12 return iterencode(o, 0)
2024-03-07 01:57:12 File "/usr/lib/python3.10/json/encoder.py", line 179, in default
2024-03-07 01:57:12 raise TypeError(f'Object of type {o.class.name} '
2024-03-07 01:57:12 TypeError: Object of type date is not JSON serializable
2024-03-07 01:59:40 [2024-03-06T20:29:40Z] {/usr/local/lib/python3.10/dist-packages/flask/app.py:828} ERROR - Exception on /admin/config [PUT]
2024-03-07 01:59:40 Traceback (most recent call last):
2024-03-07 01:59:40 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 1463, in wsgi_app
2024-03-07 01:59:40 response = self.full_dispatch_request()
2024-03-07 01:59:40 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 872, in full_dispatch_request
2024-03-07 01:59:40 rv = self.handle_user_exception(e)
2024-03-07 01:59:40 File "/usr/local/lib/python3.10/dist-packages/flask_cors/extension.py", line 176, in wrapped_function
2024-03-07 01:59:40 return cors_after_request(app.make_response(f(*args, **kwargs)))
2024-03-07 01:59:40 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 870, in full_dispatch_request
2024-03-07 01:59:40 rv = self.dispatch_request()
2024-03-07 01:59:40 File "/usr/local/lib/python3.10/dist-packages/flask/app.py", line 855, in dispatch_request
2024-03-07 01:59:40 return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
2024-03-07 01:59:40 File "/pygeoapi/pygeoapi/flask_app.py", line 494, in admin_config
2024-03-07 01:59:40 return get_response(admin
.put_config(request))
2024-03-07 01:59:40 File "/pygeoapi/pygeoapi/api.py", line 211, in inner
2024-03-07 01:59:40 return func(cls, req_out)
2024-03-07 01:59:40 File "/pygeoapi/pygeoapi/admin.py", line 242, in put_config
2024-03-07 01:59:40 self.write(data)
2024-03-07 01:59:40 File "/pygeoapi/pygeoapi/admin.py", line 115, in write
2024-03-07 01:59:40 self.write_config(config)
2024-03-07 01:59:40 File "/pygeoapi/pygeoapi/admin.py", line 133, in write_config
2024-03-07 01:59:40 patch = make_patch(conf, raw_conf)
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 175, in make_patch
2024-03-07 01:59:40 return JsonPatch.from_diff(src, dst, pointer_cls=pointer_cls)
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 639, in from_diff
2024-03-07 01:59:40 builder._compare_values('', None, src, dst)
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:59:40 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:59:40 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:59:40 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:59:40 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:59:40 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:59:40 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:59:40 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:59:40 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 884, in _compare_values
2024-03-07 01:59:40 self._compare_dicts(_path_join(path, key), src, dst)
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 851, in _compare_dicts
2024-03-07 01:59:40 self._compare_values(path, key, src[key], dst[key])
2024-03-07 01:59:40 File "/usr/lib/python3/dist-packages/jsonpatch.py", line 897, in _compare_values
2024-03-07 01:59:40 elif self.dumps(src) == self.dumps(dst):
2024-03-07 01:59:40 File "/usr/lib/python3.10/json/init.py", line 231, in dumps
2024-03-07 01:59:40 return _default_encoder.encode(obj)
2024-03-07 01:59:40 File "/usr/lib/python3.10/json/encoder.py", line 199, in encode
2024-03-07 01:59:40 chunks = self.iterencode(o, _one_shot=True)
2024-03-07 01:59:40 File "/usr/lib/python3.10/json/encoder.py", line 257, in iterencode
2024-03-07 01:59:40 return _iterencode(o, 0)
2024-03-07 01:59:40 File "/usr/lib/python3.10/json/encoder.py", line 179, in default
2024-03-07 01:59:40 raise TypeError(f'Object of type {o.class.name} '
2024-03-07 01:59:40 TypeError: Object of type date is not JSON serializable
2024-03-07 02:14:52 [2024-03-06 20:44:52 +0000] [1] [INFO] Handling signal: term
2024-03-07 02:14:53 [2024-03-06 20:44:53 +0000] [13] [INFO] Worker exiting (pid: 13)
2024-03-07 02:14:53 [2024-03-06 20:44:53 +0000] [12] [INFO] Worker exiting (pid: 12)
2024-03-07 02:14:53 [2024-03-06 20:44:53 +0000] [11] [INFO] Worker exiting (pid: 11)
2024-03-07 02:14:53 [2024-03-06 20:44:53 +0000] [14] [INFO] Worker exiting (pid: 14)
2024-03-07 02:14:56 [2024-03-06 20:44:56 +0000] [1] [INFO] Shutting down: Master

Replicated this issue in local, and the default date encoder fixed the issue in encoder.py of JSON library which is being used by Jsonpatch.

if isinstance(o, (datetime.date, datetime.datetime)):
return o.isoformat()

But I think this should be managed somewhere in pygeoapi end

@krishnaglodha @tomkralidis

@1ly1mk 1ly1mk added the bug Something isn't working label Mar 10, 2024
@tomkralidis
Copy link
Member

@1ly1mk can you provide a payload that I can use to reproduce? Thanks

@1ly1mk
Copy link
Author

1ly1mk commented Mar 11, 2024

@tomkralidis here is the payload for PATCH

{
      "metadata": {
        "identification": {
            "title": "pygeoapi  admin api test",
            "description": "pygeoapi provides an API to geospatial data",
            "keywords": [
                "geospatial",
                "data",
                "api"
            ],
            "keywords_type": "theme",
            "terms_of_service": "https://creativecommons.org/licenses/by/4.0/",
            "url": "http://example.org"
        },
        "license": {
            "name": "CC-BY 4.0 license",
            "url": "https://creativecommons.org/licenses/by/4.0/"
        },
        "provider": {
            "name": "Organization Name",
            "url": "https://pygeoapi.io"
        },
        "contact": {
            "name": "Lastname, Firstname",
            "position": "Position Title",
            "address": "Mailing Address",
            "city": "City",
            "stateorprovince": "Administrative Area",
            "postalcode": "Zip or Postal Code",
            "country": "Country",
            "phone": "+xx-xxx-xxx-xxxx",
            "fax": "+xx-xxx-xxx-xxxx",
            "email": "you@example.org",
            "url": "Contact URL",
            "hours": "Hours of Service",
            "instructions": "During hours of service.  Off on weekends.",
            "role": "pointOfContact"
        }
    }
}

@tomkralidis
Copy link
Member

Looks like the existing YAML config that gets parsed into a dict preserves a native datetime value. We could write dates in YAML as literal strings, but that is assuming users are doing same. We could also "round trip" the YAML->dict->JSON->dict as follows:

diff --git a/pygeoapi/config.py b/pygeoapi/config.py
index d1bf5c3..f542325 100644
--- a/pygeoapi/config.py
+++ b/pygeoapi/config.py
@@ -59,7 +59,7 @@ def get_config(raw: bool = False) -> dict:
         else:
             CONFIG = yaml_load(fh)
 
-    return CONFIG
+    return json.loads(to_json(CONFIG))
 
 
 def load_schema() -> dict:

however this seems like extra hops/more moving parts.

cc'ing @webb-ben here for thoughts/input.

@tomkralidis
Copy link
Member

@1ly1mk FYI @webb-ben has made a fix in master. Please test and re-open if latest master does not fix this issue.

@tomkralidis tomkralidis added this to the 0.17.0 milestone Apr 3, 2024
@1ly1mk
Copy link
Author

1ly1mk commented Apr 3, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants