Knowledge Base

Ask A Question

Questions

1

Python API Memory Error

I am trying to download a large report using the Nexpose Python API. However I get a memory error when running the script. Any Help would be great! Traceback (most recent call last): File "C:\Users\jstegman\AppData\Local\Programs\Python\Python36-32\ExtractDataFromNexpose.py", line 61, in <module> generate_report() File "C:\Users\jstegman\AppData\Local\Programs\Python\Python36-32\ExtractDataFromNexpose.py", line 42, in generate_report download_report(report_client, report_id, report_instance_id) File "C:\Users\jstegman\AppData\Local\Programs\Python\Python36-32\ExtractDataFromNexpose.py", line 55, in download_report client.download_report(report_id, instance_id) File "C:\Users\jstegman\AppData\Roaming\Python\Python36\site-packages\rapid7_vm_console-0.0.1_6.5.19-py3.6.egg\rapid7vmconsole\api\report_api.py", line 357, in download_report (data) = self.download_report_with_http_info(id, instance, **kwargs) # noqa: E501 File "C:\Users\jstegman\AppData\Roaming\Python\Python36\site-packages\rapid7_vm_console-0.0.1_6.5.19-py3.6.egg\rapid7vmconsole\api\report_api.py", line 442, in download_report_with_http_info collection_formats=collection_formats) File "C:\Users\jstegman\AppData\Roaming\Python\Python36\site-packages\rapid7_vm_console-0.0.1_6.5.19-py3.6.egg\rapid7vmconsole\api_client.py", line 322, in call_api _preload_content, _request_timeout) File "C:\Users\jstegman\AppData\Roaming\Python\Python36\site-packages\rapid7_vm_console-0.0.1_6.5.19-py3.6.egg\rapid7vmconsole\api_client.py", line 153, in __call_api _request_timeout=_request_timeout) File "C:\Users\jstegman\AppData\Roaming\Python\Python36\site-packages\rapid7_vm_console-0.0.1_6.5.19-py3.6.egg\rapid7vmconsole\api_client.py", line 343, in request headers=headers) File "C:\Users\jstegman\AppData\Roaming\Python\Python36\site-packages\rapid7_vm_console-0.0.1_6.5.19-py3.6.egg\rapid7vmconsole\rest.py", line 238, in GET query_params=query_params) File "C:\Users\jstegman\AppData\Roaming\Python\Python36\site-packages\rapid7_vm_console-0.0.1_6.5.19-py3.6.egg\rapid7vmconsole\rest.py", line 222, in request r.data = r.data.decode('utf8') MemoryError

Posted by Jonah Stegman 6 months ago