censys-python icon indicating copy to clipboard operation
censys-python copied to clipboard

Does not save results after exception

Open xroot000 opened this issue 3 years ago • 5 comments

When I run (expected to be ~100k records): censys search -o SAVE.json "some_query_here" --pages=-1

After some time I got: censys.common.exceptions.CensysRateLimitExceededException: 429 (Too Many Requests): You have used your full quota for this billing period. Please see https://search.censys.io/account or contact [email protected].

But it does not save results (even already received records.. maybe 100? maybe 1k ?), just waste query quota to 0 and no file was created. I think flush results will help

Censys Python Version: 2.1.6

xroot000 avatar Jul 14 '22 16:07 xroot000

Hi @xroot000,

Thank you for bringing this to our attention. I will fix this issue and escalate this issue internally.

thehappydinoa avatar Jul 18 '22 15:07 thehappydinoa

Closing this issue as this bug will be resolved with the new release.

thehappydinoa avatar Jul 26 '22 16:07 thehappydinoa

same thing with timeout exception: requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='search.censys.io', port=443): Read timed out. (read timeout=30)

results were not saved to file and search quota decreased(

xroot000 avatar Jul 29 '22 19:07 xroot000

Hi @xroot000, I am quite sorry to hear that this happened again. We just released a new version (v2.1.7) that contains a fix for this issue. Would you please send me an email at aidan[@]censys.io with your Censys Account details so we can fix that quota issue.

thehappydinoa avatar Jul 29 '22 20:07 thehappydinoa

the timeout bug still is in the code:

" raise ReadTimeout(e, request=request) requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='search.censys.io', port=443): Read timed out. (read timeout=30)"

Censys Python Version: 2.1.7

no file saved, all data lost, quota disappears :)

xroot000 avatar Jul 30 '22 16:07 xroot000

Hi there,

We just released a new version with all exception handling via the CLI. Please try version 2.1.8, I am going to go ahead and close this issue, but if they comes back up, I would be more than happy to reopen.

thehappydinoa avatar Aug 17 '22 16:08 thehappydinoa