Closed cleanunicorn closed 5 years ago
@cleanunicorn this issue relates to PR: https://github.com/dmuhs/pythx/pull/31
Same here with the example from the README:
$ python wachhund.py
Traceback (most recent call last):
File "wachhund.py", line 8, in <module>
resp = c.analyze(bytecode="0xfe")
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/api/client.py", line 235, in analyze
return self._assemble_send_parse(req, respmodels.AnalysisSubmissionResponse)
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/api/client.py", line 89, in _assemble_send_parse
return self.handler.parse_response(resp, resp_model)
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/api/handler.py", line 164, in parse_response
m = model.from_json(resp)
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/models/response/base.py", line 54, in from_json
return cls.from_dict(parsed)
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/models/response/analysis_submission.py", line 28, in from_dict
return cls(analysis=Analysis.from_dict(d))
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/models/response/analysis.py", line 64, in from_dict
return cls(**d)
TypeError: __init__() got an unexpected keyword argument 'client_tool_name'
(pythx) cerebral-cortex:mythx-wachhund bernhardmueller$ python wachhund.py
Traceback (most recent call last):
File "wachhund.py", line 8, in <module>
resp = c.analyze(bytecode="0xfe")
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/api/client.py", line 235, in analyze
return self._assemble_send_parse(req, respmodels.AnalysisSubmissionResponse)
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/api/client.py", line 89, in _assemble_send_parse
return self.handler.parse_response(resp, resp_model)
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/api/handler.py", line 164, in parse_response
m = model.from_json(resp)
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/models/response/base.py", line 54, in from_json
return cls.from_dict(parsed)
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/models/response/analysis_submission.py", line 28, in from_dict
return cls(analysis=Analysis.from_dict(d))
File "/Users/bernhardmueller/.pyenv/versions/pythx/lib/python3.6/site-packages/pythx/models/response/analysis.py", line 64, in from_dict
return cls(**d)
TypeError: __init__() got an unexpected keyword argument 'client_tool_name'
These faults were connected to a newly added API field in the status response - denoting the client tool ID the request was sent with. This was not supported by the internal PythX domain models so far, which is why the parsing routines errored out. PR #31 aimed to fix it, but first related only to staging. After the move to production I have merged this now.
You guys caught me in a transition period :stuck_out_tongue: If you install version 1.1.8 now, all should work fine.
Description
A lot of commands fail with:
TypeError: __init__() got an unexpected keyword argument 'client_tool_name'
.Login worked but when I tried to check the list of analyses or a specific analysis, I get the error.
What I Did