jaraco / googlevoice

Python Google Voice library based on pygooglevoice
MIT License
112 stars 33 forks source link

ImportError: cannot import name 'Voice' from 'googlevoice' #9

Closed craiglavallee closed 4 years ago

craiglavallee commented 5 years ago

rom googlevoice import Voice from googlevoice.util import input

voice = Voice() voice.login()

outgoingNumber = input('Number to call: ') forwardingNumber = input('Number to call from [optional]: ') or None

voice.call(outgoingNumber, forwardingNumber)

if input('Calling now... cancel?[y/N] ').lower() == 'y': voice.cancel(outgoingNumber, forwardingNumber)

Traceback (most recent call last): File "/Users/craiglavallee/Downloads/googlevoice.py", line 1, in from googlevoice import Voice File "/Users/craiglavallee/Downloads/googlevoice.py", line 1, in from googlevoice import Voice ImportError: cannot import name 'Voice' from 'googlevoice' (/Users/craiglavallee/Downloads/googlevoice.py)

craiglavallee commented 5 years ago

Help @#$%^&

Papachips commented 5 years ago

You can't call your file 'googlevoice.py'.

I was able to reproduce the issue and changing the name AND deleting the file named 'googlevoice.py' should resolve your issue. In my screenshot, I changed the file name to 'test.py'

image