[Bug] Sample code fails with JSON parse error
nicoandmee opened this issue · 2 comments
nicoandmee commented
Hi, I'm attempting to get the basic sample code provided working but have run into trouble. I get the following error when running it- I have tried multiple python versions as well. 🤔
import netlas
apikey = "API_KEY"
netlas_connection = netlas.Netlas(api_key=apikey)
query_res = netlas_connection.query(query="port:7001")
print(netlas.helpers.dump_object(data=query_res))
python netlas_query.py
Traceback (most recent call last):
File "/home/op/shodan/netlas_query.py", line 6, in <module>
query_res = netlas_connection.query(query="port:7001")
File "/home/op/.pyenv/versions/3.10.4/lib/python3.10/site-packages/netlas/client.py", line 127, in query
ret = self._request(
File "/home/op/.pyenv/versions/3.10.4/lib/python3.10/site-packages/netlas/client.py", line 69, in _request
raise APIError(ret["error"])
netlas-io commented
Hello, Nico!
I'm really sorry! The API has changed and we haven't updated the SDK yet. We are in the process right now. Update will be available in a week or two.
Accept my apologies, please. This is our fault (
Best regards, Artur Kotylevskiy
CEO at Netlas.io
email: ***@***.***
telegram: @kotylevskiy
… On 27 Oct 2022, at 04:10, Nico Kokonas ***@***.***> wrote:
Hi, I'm attempting to get the basic sample code provided working but have run into trouble. I get the following error when running it- I have tried multiple python versions as well. 🤔
import netlas
apikey = "API_KEY"
netlas_connection = netlas.Netlas(api_key=apikey)
query_res = netlas_connection.query(query="port:7001")
print(netlas.helpers.dump_object(data=query_res))
python netlas_query.py
Traceback (most recent call last):
File "/home/op/shodan/netlas_query.py", line 6, in <module>
query_res = netlas_connection.query(query="port:7001")
File "/home/op/.pyenv/versions/3.10.4/lib/python3.10/site-packages/netlas/client.py", line 127, in query
ret = self._request(
File "/home/op/.pyenv/versions/3.10.4/lib/python3.10/site-packages/netlas/client.py", line 69, in _request
raise APIError(ret["error"])
—
Reply to this email directly, view it on GitHub <#1>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AS3LZA2QYZG73MB6NKZZSTLWFHJBFANCNFSM6AAAAAARPRGKWI>.
You are receiving this because you are subscribed to this thread.