-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
get_results returns TypeError: Expected str or file, got '<type 'Element'>' instead #17
Comments
I dig into the code actually and I wrote my own function to parse the result as follow def parse(res):
output = []
results = res.getchildren()
for result in results:
children = result.getchildren()
obj = {}
for child in children:
obj[child.tag] = child.text
output.append(obj)
return output I can now call it like this parse(scanner.get_results(scan_id)) which returns a python list contains all results I don't know how to fix the original parse function, I believe they will patch it soon ❇️ |
Hello, Thanks Sylvain |
i'm facing same issue: File "/Users/openvas-stuffs/lib/python2.7/site-packages/openvas_lib/ompv7.py", line 1099, in get_report_xml |
openvas_results = scanner.get_report_id(scan_id)
print openvas_results
Returns
TypeError: Expected str or file, got '<type 'Element'>' instead
Why??????
The text was updated successfully, but these errors were encountered: