You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the scripts in the reports2/ directory, the create-firewall-data.py (and potentially others) doesn't properly handler failures from the IQ API.
$ cd reports2 && ./create-data.sh http://localhost:8070 admin admin123
applicationevaluations.json
applicationevaluations.csv
policyviolations.json
policyviolations.csv
componentsinquarantine.json
componentsinquarantine.csv
componentwaivers.json
componentwaivers.csv
./quarantine_data/autoreleased_from_quarantine_summary.json
Traceback (most recent call last):
File "/Users/me/code/succes-metrics/successmetrics-84/reports2/create-firewall-data.py", line 249, in<module>main()
File "/Users/me/code/succes-metrics/successmetrics-84/reports2/create-firewall-data.py", line 239, in main
summary_report("autoreleased_from_quarantine_summary", "releaseQuarantine/summary")
File "/Users/me/code/succes-metrics/successmetrics-84/reports2/create-firewall-data.py", line 66, in summary_report
forkeyindata.keys():
AttributeError: 'str' object has no attribute 'keys'
This error is caused by the autoreleased_from_quarantine_summary.json file containing "Error fetching data" instead of the expected JSON.
When API requests fail, get_nexusiq_data returns "Error fetching data" (str); however, certain parts of the code expect that method to always return a dict:
When running the scripts in the
reports2/
directory, thecreate-firewall-data.py
(and potentially others) doesn't properly handler failures from the IQ API.This error is caused by the
autoreleased_from_quarantine_summary.json
file containing "Error fetching data" instead of the expected JSON.$ cat reports2/quarantine_data/autoreleased_from_quarantine_summary.json "Error fetching data"
When API requests fail,
get_nexusiq_data
returns "Error fetching data" (str
); however, certain parts of the code expect that method to always return adict
:iq-success-metrics2/releasefiles/reports2/create-firewall-data.py
Lines 65 to 67 in 60de16d
iq-success-metrics2/releasefiles/reports2/create-firewall-data.py
Lines 36 to 39 in 60de16d
The text was updated successfully, but these errors were encountered: