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

Unhandled exception in event consumer. Analytics events were not processed. #57

Closed
kjwilcox opened this issue Oct 20, 2016 · 4 comments
Closed

Comments

@kjwilcox
Copy link

When calling launchdarkly_client.toggle(), we often see an error log with the following traceback:

Traceback (most recent call last):
  File "/path/to/virtualenv/lib/python3.5/site-packages/ldclient/event_consumer.py", line 50, in do_send
    data=json.dumps(body))
  File "/usr/local/python/lib/python3.5/json/__init__.py", line 230, in dumps
    return _default_encoder.encode(obj)
  File "/usr/local/python/lib/python3.5/json/encoder.py", line 198, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/local/python/lib/python3.5/json/encoder.py", line 256, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/python/lib/python3.5/json/encoder.py", line 179, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: <object object at 0x7f3b18c7c230> is not JSON serializable

The user object we are providing to .toggle() does not contain any non-json-serializable fields. Example: {'anonymous': True, 'key': 'SECRET', 'custom': {'client': 'sandbox', 'roles': (), 'superuser': False}}

We are currently using version 0.20.3, but this problem repros on 3.0.0. Running on Python 3.5.2 on Ubuntu 14.04.

Is there a way for us to opt-out of these failing analytics events? Or can the this client library be updated to fix this error?

@drichelson
Copy link
Contributor

drichelson commented Oct 20, 2016

Thanks for reporting this + the details. I'm taking a look right now. Expect an update shortly.

@drichelson
Copy link
Contributor

@kjwilcox do you mind emailing support@launchdarkly.com and we can follow up there?

@kjwilcox
Copy link
Author

No problem, email sent.

@drichelson
Copy link
Contributor

eli-darkly added a commit that referenced this issue May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants