cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2081
Views
10
Helpful
2
Comments
IamSamSaul
Level 1
Level 1

Hi there,

 

I have downloaded a Python script to find the duplicates on Cisco AMP for Endpoints dashboard from the following URL:

 

 https://github.com/CiscoSecurity/amp-04-find-duplicate-guids

 

When I'm running the Python script, I'm getting the following error:

 

py find_duplicate_guids.py
Traceback (most recent call last):
File "find_duplicate_guids.py", line 147, in <module>
main()
File "find_duplicate_guids.py", line 124, in main
total_guids = response_json['metadata']['results']['total']
KeyError: 'metadata'

 

I hope someone can help me solving this issue. Thanks.

 

Regards,

 

Sam

2 Comments
tlz
Level 1
Level 1

Hi

looks like the response does not contain the expected output.

try with a simple print(response_json) to debug. Maybe you have to go further up in the code.

Often in such sample scripts there is no exception handling or error checking done.

 

Just to be sure: use python3 as interpreter means run 

python3 <script.py>

 

OzRL5
Level 1
Level 1

Did you ever figure out the issue?

 

I am getting syntax error

 

also did you generate a new API credential to run the script?

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: