我在基於yowsup的Python上創建項目。 (可以在這裏找到:https://github.com/jorgehortelano/yowsup-commandserver)這個想法是使用WhatsApp執行命令。將python腳本從一臺機器遷移到其他機器會導致模塊錯誤
我在我的本地計算機(ubuntu 14.04.4 LTS)中編譯了Python。它工作正常,我可以使用WhatsApp與我的軟件進行通信。它使用Python 2.7.6
現在我想用Ubuntu 15.10將它安裝在Raspberry Pi 2上。它使用Python 2.7.10。
與樹莓簡單git clone
克隆庫,並試圖執行它的原因:
Traceback (most recent call last):
File "./yowsup-commandserver", line 358, in <module>
if not parser.process():
File "./yowsup-commandserver", line 239, in process
self.startCommandServer()
File "./yowsup-commandserver", line 299, in startCommandServer
stack = commandserver.YowsupCommandServerStack(credentials, allowed_users, not self.args["unmoxie"])
AttributeError: 'module' object has no attribute 'YowsupCommandServerStack'
我可以理解,可以將模塊定義錯誤,因爲我與蟒蛇一個初學者,但我做不到理解爲什麼在我的臺式計算機中正確執行,而不是在Raspberry Pi中執行。
我不指望有人將它修復給我,我只想了解爲什麼從一臺機器移動到另一臺機器時模塊沒有正確加載。
您的軟件包結構看起來很雜亂。哪個文件給出我無法理解的錯誤。請分享GitHub鏈接或相關文件行。 – mertyildiran
git項目已經在問題中了。 – JorgeHortelano