stv0g / transwhat

A gateway between the XMPP and the WhatsApp IM networks
https://dev.0l.de/wiki/projects/transwhat/
GNU General Public License v3.0
122 stars 23 forks source link

Send image failed #69

Closed nicolas-it closed 7 years ago

nicolas-it commented 7 years ago

Unfortunately sending images does not work for me. This is my Spectrum2-Log: Is this a transwhat or a Spectrum2-based issue?

2017-01-08 13:37:17,510 INFO Session: Message sent from xxxxxxxxxxxx to xxxxxxxxxxxx: https://xxxxxxxxx.de:5281/upload/3f38b2e5-b555-4d5e-aed8-884f6d9922d8/54774b1e-495f-4281-bad8-e523f7d843d3.jpg (xhtml=)
2017-01-08 13:37:17,510 INFO Session: URL: https://xxxxxxxxx.de:5281/upload/3f38b2e5-b555-4d5e-aed8-884f6d9922d8/54774b1e-495f-4281-bad8-e523f7d843d3.jpg
2017-01-08 13:37:17,585 INFO Session: Success: Image downloaded to <deferred.Deferred object at 0x7f69267af890>
2017-01-08 13:37:17,585 INFO Session: Sending image to xxxxxxxxxxxx@s.whatsapp.net
2017-01-08 13:37:17,589 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 424, in handleDataRead
    self.handleConvMessagePayload(wrapper.payload)
  File "/opt/transwhat/Spectrum2/backend.py", line 280, in handleConvMessagePayload
    self.handleMessageSendRequest(payload.userName, payload.buddyName, payload.message, payload.xhtml, payload.id)
  File "/opt/transwhat/whatsappbackend.py", line 80, in handleMessageSendRequest
    self.sessions[user].sendMessageToWA(buddy, message, ID, xhtml)
  File "/opt/transwhat/session.py", line 697, in sendMessageToWA
    self.logger.info("WA Message send to %s with ID %s", buddy, waId)
UnboundLocalError: local variable 'waId' referenced before assignment

2017-01-08 13:37:17,976 ERROR yowsup.layers.protocol_media.mediauploader: Error occured at transfer global name 'resultRequestUploadIqProtocolEntity' is not defined
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.0-py2.7.egg/yowsup/layers/protocol_media/mediauploader.py", line 102, in run
    self.progressCallback(self.sourcePath, self.jid, uploadUrl, int(status))
  File "/opt/transwhat/yowsupwrapper.py", line 209, in onUploadProgress
    resultRequestUploadIqProtocolEntity.getUrl(),
NameError: global name 'resultRequestUploadIqProtocolEntity' is not defined
2017-01-08 13:37:17,978 ERROR Session: Upload Error!
stv0g commented 7 years ago

Seems like I've made some mistakes during my last merge session.

Can you test if the latest version fixes your problem? I don't have access to a running installation atm.