Page MenuHomeSoftware Heritage

Jenkins > .tox.py3.lib.python3.7.site-packages.swh.graph.tests.test_api_client::test_count
Failed

TEST RESULT

Run At
Oct 5 2020, 6:24 PM
Details
self = <RemoteGraphClient url=http://127.0.0.1:43531/graph/> response = <Response [400]> def raise_for_status(self, response) -> None: """check response HTTP status code and raise an exception if it denotes an error; do nothing otherwise """ status_code = response.status_code status_class = response.status_code // 100 if status_code == 404: raise RemoteException(payload="404 not found", response=response) exception = None # TODO: only old servers send pickled error; stop trying to unpickle # after they are all upgraded try: if status_class == 4: data = self._decode_response(response, check_status=False) if isinstance(data, dict): for exc_type in self.reraise_exceptions: if exc_type.__name__ == data["exception"]["type"]: exception = exc_type(*data["exception"]["args"]) break else: exception = RemoteException( payload=data["exception"], response=response ) else: > exception = pickle.loads(data) E TypeError: a bytes-like object is required, not 'str' .tox/py3/lib/python3.7/site-packages/swh/core/api/__init__.py:326: TypeError During handling of the above exception, another exception occurred: graph_client = <RemoteGraphClient url=http://127.0.0.1:43531/graph/> def test_count(graph_client): actual = graph_client.count_leaves( > "swh:1:ori:0000000000000000000000000000000000000021" ) .tox/py3/lib/python3.7/site-packages/swh/graph/tests/test_api_client.py:245: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .tox/py3/lib/python3.7/site-packages/swh/graph/client.py:97: in count_leaves params={"edges": edges, "direction": direction}, .tox/py3/lib/python3.7/site-packages/swh/core/api/__init__.py:293: in get return self._decode_response(response) .tox/py3/lib/python3.7/site-packages/swh/core/api/__init__.py:351: in _decode_response self.raise_for_status(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <RemoteGraphClient url=http://127.0.0.1:43531/graph/> response = <Response [400]> def raise_for_status(self, response) -> None: """check response HTTP status code and raise an exception if it denotes an error; do nothing otherwise """ status_code = response.status_code status_class = response.status_code // 100 if status_code == 404: raise RemoteException(payload="404 not found", response=response) exception = None # TODO: only old servers send pickled error; stop trying to unpickle # after they are all upgraded try: if status_class == 4: data = self._decode_response(response, check_status=False) if isinstance(data, dict): for exc_type in self.reraise_exceptions: if exc_type.__name__ == data["exception"]["type"]: exception = exc_type(*data["exception"]["args"]) break else: exception = RemoteException( payload=data["exception"], response=response ) else: exception = pickle.loads(data) elif status_class == 5: data = self._decode_response(response, check_status=False) if "exception_pickled" in data: exception = pickle.loads(data["exception_pickled"]) else: exception = RemoteException( payload=data["exception"], response=response ) except (TypeError, pickle.UnpicklingError): > raise RemoteException(payload=data, response=response) E swh.core.api.RemoteException: invalid edge restriction: %2A .tox/py3/lib/python3.7/site-packages/swh/core/api/__init__.py:338: RemoteException