Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

unit tests fail with TypeError (frozendict is not JSON serializable) in Fedora Rawhide #2351

Closed
jeremycline opened this issue Jul 10, 2017 · 1 comment

Comments

@jeremycline
Copy link
Contributor

Hey all,

I'm the package maintainer for Synapse in Fedora. When trying to update to the latest version in Rawhide, I encountered some test failures. From the full build log:

[ERROR]
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 1185, in _inlineCallbacks
    result = g.send(result)
  File "/builddir/build/BUILD/synapse-0.22.1/synapse/handlers/message.py", line 506, in handle_new_client_event
    dump = ujson.dumps(event.content)
exceptions.TypeError: <frozendict {'creator': '@some_other_guy:red'}> is not JSON serializable
tests.rest.client.v1.test_rooms.RoomsMemberListTestCase.test_get_member_list_mixed_memberships
tests.rest.client.v1.test_rooms.RoomsMemberListTestCase.test_get_member_list_no_permission

All the tests are failing from the same spot. It looks like fcf01dd introduced the change.

@ignatenkobrain
Copy link

We've had conversation on IRC with @jeremycline and it turns out that in Fedora we have ujson of snapshot 2.0... And it seems commit ultrajson/ultrajson@53f85b1 breaks thing... So just casting frozendict to dict should do the trick when serializing / deserializing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants