Closed rafaeldelrey closed 1 year ago
Tracking the problem root cause I got the following:
The problem
The issue was caused by a problematic JSON string, which contained an unexpected value. Specifically, the string was: {"data_source": NaN }
. When the sample code attempted to decode this string using the response.json()
function from the requests library, it encountered an error due to the unexpected value.
It's important to note that this issue is not specific to the pyattck library, but rather a problem with the JSON format and/or the requests library that uses a json library that shows that error.
To reproduce the error, the sample code tries to use the simplejson==3.19.1 library if it is installed, and falls back to the built-in json library if it is not. In this case, the error only occurred when using simplejson.
Solution
To resolve this issue, you can downgrade the simplejson==3.19.1 library to version simplejson==3.18.4, or remove it altogether. Alternatively, you can modify the JSON string to remove the unexpected value.
This should be resolved now. Please reopen if not.
Describe the bug Tried to run the example on the main page and got a JSONDecodeError. Tested on a MacBook M2 and Ubuntu, both with Python 3.10 on miniconda environment.
To Reproduce Sample code to enumerate techniques