Error
Here is the last traceback from a Nuxeo Drive hard crash:
Traceback (most recent call last): File "nxdrive/__main__.py", line 119, in main File "nxdrive/commandline.py", line 539, in handle File "nxdrive/commandline.py", line 547, in get_manager File "nxdrive/manager.py", line 219, in __init__ File "nxdrive/manager.py", line 448, in load File "nxdrive/engine/engine.py", line 172, in __init__ File "nxdrive/engine/engine.py", line 977, in init_remote File "nxdrive/client/remote_client.py", line 135, in __init__ File "site-packages/nuxeo/client.py", line 370, in server_version File "site-packages/nuxeo/client.py", line 360, in server_info File "site-packages/requests/models.py", line 898, in json File "json/__init__.py", line 348, in loads File "json/decoder.py", line 337, in decode File "json/decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Cf. https://github.com/nuxeo/nuxeo-python-client/blob/764c064/nuxeo/client.py#L359-L360.
Analysis
For whatever reason, the HTTP call to /json/cmis returned something else than JSON. And the condition was taken but the conversion using response.json() failed.
Fix
if isinstance(response, requests.Response): try: info = response.json()["default"] except ValueError: log.warning(...) info = None else: info = response
- is related to
-
NXPY-177 Prevent AttributeError when fetching the server version and the response is bad
- Resolved