Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'Struct' object is not iterable #8

Open
sriramkg86 opened this issue Mar 3, 2022 · 1 comment
Open

TypeError: 'Struct' object is not iterable #8

sriramkg86 opened this issue Mar 3, 2022 · 1 comment

Comments

@sriramkg86
Copy link

Traceback (most recent call last):
File "Veracode_Gate_Script.py", line 42, in
v_results = v.get_scan_results(application_name, sandbox_name, version_id)
File "F:\CIO_Metrics\Veracode_API.py", line 15, in get_scan_results
app = Application(app_name)
File "C:\Program Files (x86)\Python38-32\lib\site-packages\veracode\application.py", line 22, in new
return ExistingApplication(name, sandbox, build)
File "C:\Program Files (x86)\Python38-32\lib\site-packages\veracode\application.py", line 146, in init
self.info = self._get_app_by_name(app_name).application
File "C:\Program Files (x86)\Python38-32\lib\site-packages\veracode\application.py", line 180, in _get_app_by_name
for app in apps.app:
TypeError: 'Struct' object is not iterable
##[error]Cmd.exe exited with code '1'.

@sriramkg86
Copy link
Author

sriramkg86 commented Mar 3, 2022

at run time it results as an array list, I think this is the root cause where it causing an exception.

<applist xmlns="https://analysiscenter.veracode.com/schema/2.0/applist" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" account_id="11810" applist_version="1.2" xsi:schemaLocation="https://analysiscenter.veracode.com/schema/2.0/applist https://analysiscenter.veracode.com/resource/2.0/applist.xsd">





















Basically, need to put a filter at the function definition " _get_app_by_name" to select the appropriate entry to return if the input has an array list of applications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant