ranyixu / aionmap

A python asyncio wrap of nmap.
13 stars 6 forks source link

AttributeError: module 'collections' has no attribute 'Iterable' #5

Open tmetodie opened 1 year ago

tmetodie commented 1 year ago
Traceback (most recent call last):
  File "/tmp/my_code.py", line 165, in do_nmap_scan
    self.scan_result = await self.port_scanner.scan(
  File "/root/.cache/pypoetry/virtualenvs/tmetodie-YyvKRRl0-py3.10/lib/python3.10/site-packages/aionmap/__init__.py", line 158, in scan
    scan_result = yield from self._scan_proc(*(self._get_scan_args(hosts, ports, arguments)), sudo = sudo)
  File "/root/.cache/pypoetry/virtualenvs/tmetodie-YyvKRRl0-py3.10/lib/python3.10/site-packages/aionmap/__init__.py", line 141, in _get_scan_args
    assert isinstance(hosts, (str, collections.Iterable)), 'Wrong type for [hosts], should be a string or Iterable [was {0}]'.format(type(hosts))
AttributeError: module 'collections' has no attribute 'Iterable'
hesamd108 commented 1 year ago

I have same problem

orleven commented 1 year ago

Because your python version is higher, but aionmap is using version 0.0.2, which causes this problem.

orleven commented 1 year ago

I hope the author to upload aionmap version 0.0.3 to https://pypi.org/