ServerBinding object is not JSON serializable

I have Nuxeo 6.0.0 platform with Nuxeo Drive plugin 1.4.3 installed. I installed Nuxeo Drive client for Ubuntu (14.04) as mentionned here http://doc.nuxeo.com/display/USERDOC60/Nuxeo+Drive.

I've got that error in terminal:

2015-01-20 09:46:28,449 1359 140269865395968 ERROR    nxdrive.engine.synchronizer Error in synchronization thread: <nxdrive.engine.dao.model.ServerBinding object at 0x7f932402a510> is not JSON serializable
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/nxdrive/engine/synchronizer.py", line 207, in run
    **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/nxdrive/engine/synchronizer.py", line 1635, in loop
    max_sync_step=max_sync_step)
  File "/usr/local/lib/python2.7/dist-packages/nxdrive/engine/synchronizer.py", line 1916, in update_synchronize_server
    server_binding, session=session)
  File "/usr/local/lib/python2.7/dist-packages/nxdrive/engine/synchronizer.py", line 1687, in _get_remote_changes
    summary = remote_client.get_changes(server_binding)
  File "/usr/local/lib/python2.7/dist-packages/nxdrive/client/remote_file_system_client.py", line 238, in get_changes
    last_root_definitions))
  File "/usr/local/lib/python2.7/dist-packages/nxdrive/client/base_automation_client.py", line 311, in execute
    data = json.dumps(json_struct)
  File "/usr/lib/python2.7/json/__init__.py", line 243, in dumps
    return _default_encoder.encode(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/usr/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")

I don't know if it is a problem of version compatibility between nuxeo drive client and plugin but it isn't mentionned that it needs to be in phase.

0 votes

1 answers

2317 views

ANSWER



Finally I found a solution to my problem. From here: http://answers.nuxeo.com/questions/10614/nuxeo-drive-doesnt-start-in-ubuntu-nor-windows

It is mentionned by ataillefer that master branch of nuxeo drive client isn't always stable. So I installed 1.4 branch and it works well now.

Maybe it would be useful to update the documentation.

0 votes



Yes you're right, just updated the documentation. Sorry for the inconvienence.
01/20/2015