Package "whois 0.7" does not work on Windows 10

Posted by wuerger on 2018-04-14 17:29

I tried to test the package according to the description https://pypi.python.org/pypi/whois

>>> import whois
>>> domain = whois.query('google.com')

But i only get the error

AttributeError: module 'whois' has no attribute 'query'

What is wrong there?
Thank you!

grahams
ActiveState Staff
Tue, 2018-04-17 07:49

whois 0.7 is NOT shipped with Active Python 3.5 x64. It is a third party download.

wuerger | Wed, 2018-04-18 06:58

Yes, you are right. After uninstalling ActivePython i didn't delete the C:\Python35 folder manually.

But i did it right now, and yes, after a clean fresh install of ActivePython the whois package did not appear anymore.

grahams
ActiveState Staff
Tue, 2018-04-17 08:07

https://stackoverflow.com/questions/41165091/attributeerror-module-objec...

Your error message indicates there's a bad library.

HOWEVER....
I did a clean install of ActivePython 3.5.4.3504 on the latest patch set of Windows 10, and whois will not work as documented.
At >>> domain = whois.query('google.com')
I get a stacktrace error, and
"FileNotFoundError: [WinError 2] The system cannot find the file specified"

Pip installs whois using wheels. I'm thinking that one of the wheels for whois 0.7 is missing a dependency library. If you had an older version, it will use the obsolete library because it hasn't got the correct one to replace it with.

>
wuerger | Thu, 2018-04-19 02:41

> https://stackoverflow.com/questions/41165091/attributeerror-module-objec...

I tried

pip3 install python-whois

but neither whois.whois('webscraping.com') nor whois.query('webscraping.com') worked for me with Windows 10.

So i uninstalled the package and gave up.

:-(