AttributeError: 'NoneType' object has no attribute 'findall'
Closed this issue · 2 comments
Deleted user commented
Traceback (most recent call last):
File "/usr/local/bin/batea", line 11, in <module>
load_entry_point('batea', 'console_scripts', 'batea')()
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/user/Documents/Projects/batea/batea/__main__.py", line 51, in main
report.hosts.extend([host for host in xml_parser.load_hosts(file)])
File "/Users/user/Documents/Projects/batea/batea/__main__.py", line 51, in <listcomp>
report.hosts.extend([host for host in xml_parser.load_hosts(file)])
File "/Users/user/Documents/Projects/batea/batea/core/nmap_parser.py", line 29, in load_hosts
host = self._generate_host(child)
File "/Users/user/Documents/Projects/batea/batea/core/nmap_parser.py", line 37, in _generate_host
ports=self._find_ports(subtree))
File "/Users/user/Documents/Projects/batea/batea/core/nmap_parser.py", line 52, in _find_ports
for port in host.find("ports").findall("port"):
AttributeError: 'NoneType' object has no attribute 'findall'
SergeOlivierP commented
Can you please provide the input?
SergeOlivierP commented
Fixed with #9