I installed first the nmap module in PyCharm but received as many others the error for my nmap.PortScanner function.
Therefore, I uninstalled nmap and installed python-nmap.
Now, I have however the problem with executing the command:
import nmap
ns = nmap.PortScanner
ns.scan('My.IP.Add.ress', '1-1024', '-v')
print(ns.scaninfo())
I get for the second line the error message: AttributeError: 'str' object has no attribute '_nmap_path'
However, watching all examples of this, show precisely these lines of code. Can somebody please explain what is happening?
My editor also shows for ns.scaninfo() a warning that the parameter 'self' is not filled. Again, this is not what the examples show. I am very confused by this.
As always, thank you very much for your help!