Python error module object is not callable

817 views Asked by At

I have this code:

import whois
print whois.whois('google.com')

Run in IDLE:

enter image description here

But It run ok in console:

enter image description here

1

There are 1 answers

0
Daniel Roseman On BEST ANSWER

Your script file is itself called whois.py; Python is importing that instead of the library module. Call it something else.