Closed datenklause closed 7 years ago
Please edit "yowsupwrapper.py" in your transwhat directory, to include:
from yowsup.stacks import YowStack from yowsup.stacks import YowStackBuilder from yowsup.common import YowConstants
The second line will helps you.
Regards, Simon
Tried both development and yowsup-2 branches. Component registers with prosody, is shown there in xmpp service discovery, I can register a whatsapp with it with Pidgin, but then it hangs.
backend.log :
2016-10-09 21:38:13,532 ERROR transwhat: Traceback (most recent call last): File "/opt/transwhat/transwhat.py", line 80, in handleTransportData plugin.handleDataRead(data) File "/opt/transwhat/Spectrum2/backend.py", line 418, in handleDataRead self.handleLoginPayload(wrapper.payload) File "/opt/transwhat/Spectrum2/backend.py", line 259, in handleLoginPayload self.handleLoginRequest(payload.user, payload.legacyName, payload.password, payload.extraFields) File "/opt/transwhat/whatsappbackend.py", line 60, in handleLoginRequest self.sessions[user] = Session(self, user, legacyName, extra) File "/opt/transwhat/session.py", line 60, in init super(Session, self).init() File "/opt/transwhat/yowsupwrapper.py", line 89, in init stackBuilder = YowStackBuilder() NameError: global name 'YowStackBuilder' is not defined
spectrum2.log
2016-10-09 21:37:44,807 INFO User: sirko@datenklause.de: Changing legacy network presence to 0 2016-10-09 21:37:44,808 INFO UserManager: PRESENCE2 whatsapp.datenklause.de 2016-10-09 21:37:44,810 INFO User: sirko@datenklause.de/08168e94-bf4c-465c-a0fa-32e007eab438: got disco#info 2016-10-09 21:37:44,811 INFO Component.RAW: RAW DATA OUT
2016-10-09 21:37:44,812 INFO User: PRESENCE sirko@datenklause.de/08168e94-bf4c-465c-a0fa-32e007eab438 whatsapp.datenklause.de
2016-10-09 21:37:44,814 INFO Component.RAW: RAW DATA OUT Connecting
2016-10-09 21:37:44,815 INFO User: sirko@datenklause.de: Changing legacy network presence to 2
2016-10-09 21:37:44,816 INFO UserManager: PRESENCE2 whatsapp.datenklause.de
2016-10-09 21:37:44,817 INFO Component.RAW: RAW DATA IN Buddies
2016-10-09 21:37:44,818 INFO XMPPRosterManager: sirko@datenklause.de: This server supports remote roster protoXEP
2016-10-09 21:37:45,025 INFO Component.RAW: RAW DATA IN
2016-10-09 21:37:45,030 INFO User: sirko@datenklause.de/08168e94-bf4c-465c-a0fa-32e007eab438: got disco#info
2016-10-09 21:37:50,246 INFO NetworkPluginServer: Sending PING to backends
2016-10-09 21:37:50,247 INFO NetworkPluginServer: PING to 0x18fe890 (ID=10955)
2016-10-09 21:38:10,248 INFO NetworkPluginServer: Sending PING to backends
2016-10-09 21:38:10,248 INFO NetworkPluginServer: Disconnecting backend 0x18fe890 (ID=10955). PING response not received.
2016-10-09 21:38:10,249 INFO NetworkPluginServer: Backend 0x18fe890 (ID=10955) disconnected. Current backend count=0
2016-10-09 21:38:10,249 ERROR NetworkPluginServer: Backend 0x18fe890 (ID=10955) disconnected (probably crashed) with active user sirko@datenklause.de
2016-10-09 21:38:10,249 INFO User: sirko@datenklause.de: Disconnecting from legacy network Internal Server Error, please reconnect., trying to reconnect automatically.
2016-10-09 21:38:10,252 INFO NetworkPluginServer: Starting new backend /opt/transwhat/transwhat.py --host 127.0.0.1 --port 35293 --service.backend_id=2 "-j" "whatsapp.datenklause.de" "/etc/spectrum2/transports/whatsapp.cfg"
2016-10-09 21:38:10,256 INFO NetworkPluginServer: There is no backend to handle user sirko@datenklause.de. Adding him to queue.
2016-10-09 21:38:13,490 INFO NetworkPluginServer: New backend 0x18fe890 connected. Current backend count=1
2016-10-09 21:38:13,492 INFO NetworkPluginServer: PING to 0x18fe890 (ID=)
2016-10-09 21:38:13,500 INFO NetworkPluginServer: Associating sirko@datenklause.de with this backend
2016-10-09 21:38:26,477 INFO UserManager: sirko@datenklause.de: Disconnecting user
2016-10-09 21:38:26,479 INFO User: sirko@datenklause.de: Destroying
2016-10-09 21:38:26,479 INFO Component.RAW: RAW DATA OUT
2016-10-09 21:38:26,482 INFO MySQLBackend: Disconnecting
2016-10-09 21:38:26,489 INFO NetworkPluginServer: Stopping backend 0x18fe890
2016-10-09 21:38:26,500 INFO cerr: Warning: Pending events in SimpleEventLoop at destruction tim
Any ideas?