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

AttributeError: 'NoneType' object has no attribute 'findall' #11

Closed
ghost opened this issue Dec 17, 2019 · 2 comments
Closed

AttributeError: 'NoneType' object has no attribute 'findall' #11

ghost opened this issue Dec 17, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 17, 2019

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
Copy link
Collaborator

Can you please provide the input?

@SergeOlivierP
Copy link
Collaborator

Fixed with #9

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