Python- Google语音 [英] Python- Google voice
问题描述
我正在尝试使用 http://sphinxdoc.github.io/pygooglevoice/examples.html#send-sms-messages ,但出现错误
I am trying to use http://sphinxdoc.github.io/pygooglevoice/examples.html#send-sms-messages and I am getting the error
File "build/bdist.macosx-10.6-intel/egg/googlevoice/voice.py", line 72, in login
AttributeError: 'NoneType' object has no attribute 'group'
我的代码是:
from googlevoice import Voice
from googlevoice.util import input
import sys
username, password = "email@gmail.com", "password"
voice = Voice()
voice.login(username, password)
phoneNumber = input('Number to send message to: ')
text = input('Message text: ')
voice.send_sms(phoneNumber, text)
我想知道这是登录错误还是代码错误?如果是这样,我该如何编辑代码以使其起作用?
I was wondering if that is a login error or error in the code? If so, how can I edit the code so that it works?
非常感谢您!
我一直在对此进行研究,显然这是一个常见问题,我必须更改文件voice.py中的第72行,但找不到该文件:
I have been researching this and apparently it's a common problem and I have to change line 72 in the file voice.py but I can't find the file:
/usr/local/lib/python2.7/dist-packages/googlevoice/voice.py
要安装,我做了:
$ pip install python python-setuptools
$ sudo easy_install simplejson
$ sudo easy_install -U pygooglevoice
现在我找不到voice.py文件.我在Mac上寻找了一段时间,但一无所获.
And now I can't find the voice.py file. I have been looking for a while on my mac but found nothing.
具有相同问题的其他问题: https://code.google.com/archive/p/pygooglevoice/issues/76 googlevoice不会以编程方式登录(Python) python:pygooglevoice无法登录
Other questions with the same problem: https://code.google.com/archive/p/pygooglevoice/issues/76 googlevoice will not programatically login (Python) python: pygooglevoice unable to login
请请帮助!
推荐答案
After struggling through errors and replacing the one line (which never worked...) I downloaded https://github.com/pettazz/pygooglevoice and put the googlevoice file in the same file I was working on. Hope this helps anyone with the same question.
这篇关于Python- Google语音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!