We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I saw the following error:
Exception in thread kolo-save_request_in_db: Traceback (most recent call last): File ".../lib/python3.9/threading.py", line 980, in _bootstrap_inner [23/Sep/2022 15:45:28] "POST /api/v1/treatment_request/ HTTP/1.0" 201 116 self.run() File ".../lib/python3.9/threading.py", line 917, in run self._target(*self._args, **self._kwargs) File ".../kolo-2.0.3-py3.9.egg/kolo/profiler.py", line 233, in save_request_in_db self.db_path, self.trace_id, json.dumps(json_data), wal_mode File ".../lib/python3.9/json/__init__.py", line 231, in dumps return _default_encoder.encode(obj) File ".../lib/python3.9/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File ".../lib/python3.9/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File ".../lib/python3.9/json/encoder.py", line 179, in default raise TypeError(f'Object of type {o.__class__.__name__} ' TypeError: Object of type Hashid is not JSON serializable
I believe the Hashid comes from django-hashid-field.
Hashid
Python: 3.9 Django: 4.0.7 kolo: 2.0.3 django-hashid-field: 3.3.5
The text was updated successfully, but these errors were encountered:
@icemac I've not managed to replicate this failure. Can you share more information about the code you were running which caused this?
Sorry, something went wrong.
I am using djangorestframework and https://github.com/nshafer/django-hashid-field
djangorestframework
from django.contrib.auth.models import AbstractUser from hashid_field import HashidAutoField class MyUser(AbstractUser): id = HashidAutoField( verbose_name=_('id'), primary_key=True, editable=False)
I think, I accessed a view which serializes the model to JSON.
This will be fixed in the next release.
LilyAcorn
No branches or pull requests
I saw the following error:
I believe the
Hashid
comes from django-hashid-field.Python: 3.9
Django: 4.0.7
kolo: 2.0.3
django-hashid-field: 3.3.5
The text was updated successfully, but these errors were encountered: