Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named axolotladdress #6

Closed
lapsatech opened this issue Mar 28, 2016 · 21 comments
Closed

No module named axolotladdress #6

lapsatech opened this issue Mar 28, 2016 · 21 comments

Comments

@lapsatech
Copy link

After updated yowsup from master branch I received an error:

Traceback (most recent call last):
  File "C:\Users\user1\workspace\wamqd\wamqd\daemon.py", line 15, in <module>
    from wamqd.whats_app_service import WhatsAppService
  File "C:\Users\user1\workspace\wamqd\wamqd\whats_app_service.py", line 8, in <module>
    from wamqd.whats_app_stack import WhatsAppStack
  File "C:\Users\user1\workspace\wamqd\wamqd\whats_app_stack.py", line 7, in <module>
    from wamqd.whats_app_layer import WhatsAppLayer
  File "C:\Users\user1\workspace\wamqd\wamqd\whats_app_layer.py", line 7, in <module>
    from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
  File "C:\Python27\lib\site-packages\yowsup2-2.4.48-py2.7.egg\yowsup\layers\interface\__init__.py", line 1, in <module>
    from .interface import YowInterfaceLayer, ProtocolEntityCallback
  File "C:\Python27\lib\site-packages\yowsup2-2.4.48-py2.7.egg\yowsup\layers\interface\interface.py", line 7, in <module>
    from yowsup.layers.axolotl.layer import YowAxolotlLayer
  File "C:\Python27\lib\site-packages\yowsup2-2.4.48-py2.7.egg\yowsup\layers\axolotl\__init__.py", line 1, in <module>
    from .layer import YowAxolotlLayer
  File "C:\Python27\lib\site-packages\yowsup2-2.4.48-py2.7.egg\yowsup\layers\axolotl\layer.py", line 26, in <module>
    from axolotl.axolotladdress import AxolotlAddress
ImportError: No module named axolotladdress
@cfenollosa
Copy link

Yes, it happens to me too. Maybe a file is missing from Git?

@cfenollosa
Copy link

@donkeyhot a temporal workaround is to revert to an older commit:

git checkout 56b76f994f6e049f3d6452eed9c77281941e3cb7
python setup.py install

@naamakat
Copy link

Is it possible this latest version working only on older versions of python? (lower then python3)? I've got the same error and also an error about using urllib2 (the urllib2 problem can be solved quite easily by using urllib.request)

@jlguardi
Copy link
Owner

No, you need python-axolotl 1.7. you can get it:
. python setup.py
. download directly from tgalal/python-axolotl branch

@jlguardi
Copy link
Owner

@naamakat yes it is

@naamakat
Copy link

Which python versions I can use with this branch?

@jlguardi
Copy link
Owner

I've use python 2.7 but you can check and patch for python 3.x easyly. Please, upload this patch ;)

De: naamakat
Enviado: lunes, 28 de marzo de 2016 10:20
Para: jlguardi/yowsup
Responder a: jlguardi/yowsup
CC: jlguardi
Asunto: Re: [yowsup] No module named axolotladdress (#6)

Which python versions I can use with this branch?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#6 (comment)

@naamakat
Copy link

Trying to make a patch for python3.x:

  1. cloned https://github.com/jlguardi/yowsup.git
  2. fixed urllib2 problem at yowsup/layers/protocol_media/protocolentities/message_media_downloadable.py:
    • replace: import urllib2 with: from urllib.request import urlopen
    • replace:
      data = urllib2.urlopen(self.url).read()
      with:
      data = urlopen(self.url)
  3. python3 setup.py install
  4. run my bot

get No valid sessionsBad Mac! error :(

@jlguardi
Copy link
Owner

I need a python developer (I'm c developer) to fix installation and version compatibility issues.

@jodersus
Copy link

try: 
    from urllib2 import urlopen
except ImportError:
    from urllib.request import urlopen

This should make @naamakat code compatible with both python 2 and 3

@jlguardi
Copy link
Owner

@jodersus please, make a PR due to I have no PC now but from mobile I can merge.

De: Alex
Enviado: lunes, 28 de marzo de 2016 11:48
Para: jlguardi/yowsup
Responder a: jlguardi/yowsup
CC: jlguardi
Asunto: Re: [yowsup] No module named axolotladdress (#6)

try:
    from urllib2 import urlopen
except ImportError:
    from urllib.request import urlopen

This should make @naamakat code compatible with both python 2 and 3


You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#6 (comment)

@jodersus
Copy link

I only wrote the code here, did not update my code, I use python 2.7
Not excessively familiar with git either...
@naamakat could you please do the honours?

@naamakat
Copy link

With pleasure :) as soon as it will be working ..
I'm now getting this error:

File "/usr/local/lib/python3.4/dist-packages/yowsup2-2.4.48-py3.4.egg/yowsup/layers/coder/decoder.py", line 267, in nextTreeInternal
nodeData = "".join(map(chr, nodeData))
TypeError: an integer is required (got type str)

@naamakat
Copy link

FIxed it by changing line 266 into -

if type(nodeData) is list:
nodeData = "".join(map(chr, nodeData))

but still getting the No valid sessionsBad Mac! error

@jodersus
Copy link

did you update to the latest python-axolotl version?

@naamakat
Copy link

@jodersus Yes I've pulled the master branch of https://github.com/tgalal/python-axolotl

@jlguardi
Copy link
Owner

@naamakat use develop branch instead

@naamakat
Copy link

@jlguardi The 2 branches looks the same, how can I pull the dev branch?

@jlguardi
Copy link
Owner

Git clone https://github.com/tgalal/python-axolotl.git
Git checkout develop

@naamakat
Copy link

which version of protobuf did you use? I get many errors concerning this package ..

@jlguardi
Copy link
Owner

Develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants