2012-04-17 152 views
2

其他人问这个问题,但没有答复,所以我再次问它。 我试图使用pygooglevoice API,但是当我运行SMS.py示例脚本时,它给了我一个登录错误。 我安装了Enthought python,我在想,也许我需要安装其他的东西以及为了这个运行。我看着instructions,当我尝试手动安装python-setuptools,因为没有安装yum,我得到一个错误。这是为什么sms.py不工作的原因?Pygooglevoice登录错误

+0

欢迎来到Stack Overflow Rigs!标准问题格式是提供一小段代码,用于逐字说明您的特定问题,预期的输入和输出以及任何相关的错误消息。 – 2012-04-17 23:58:14

回答

2

以下作品适合我。我遵循了pygooglevoice project discussion board, comment # 17的步骤。以下是如果从头开始的步骤。

#Command line Google Voice: 
#Updated Jan 10, 2013 

#required tools: 
sudo apt-get install python python-simplejson python-setuptools 
sudo easy_install simplejson 

# if gvoice was installed previously, then uninstall it: 
sudo rm -r /usr/local/lib/python2.7/dist-packages/googlevoice 
sudo rm /usr/local/lib/python2.7/dist-packages/pygooglevoice* 

#download pygooglevoice: 
wget http://pygooglevoice.googlecode.com/files/pygooglevoice-0.5.tar.gz 
tar -xf pygooglevoice-0.5.tar.gz 
cd pygooglevoice 

# edit settings.py to match correct Google Voice URL on line # 22: 
nano googlevoice/settings.py 

#correct URL: 
LOGIN = 'https://accounts.google.com/ServiceLogin?service=grandcentral' 
#you may check if URL is linking to Google Voice login page in browser. 
#save and quit settings.py 

#install gvoice: 
sudo python setup.py install 

#Login and make call for the first time: 
gvoice # enter login email/pwd 
    gvoice> call #follow prompts and make a call 
    gvoice>send_sms # or s to send sms 
    gvoice>exit #quit gvoice 

#After first login, you may like to edit .gvoice for default actions: 
sudo nano ~/.gvoice 

#end 
0

我做这当前工作(至少发送短信)的克隆:http://code.google.com/r/kkleidal-pygooglevoiceupdate/

的问题是,谷歌改变了登录URL。另外,我向POST请求添加了一些参数,这可能有助于解决POST请求遇到的一些问题。登录应该现在工作顺利。