2012-04-17 140 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請求遇到的一些問題。登錄應該現在工作順利。