Open Hursofid opened 6 years ago
Try again with Python 3.
I'm experiencing the same issue and I agree it is a python 2/3 related error. However, e4u
relies on the deprecated beautifulsoup
which seems to only work with python 2, so I could not find any workaround to install transwhat
. I'm using debian 9, if anyone has a fix this would make me really happy!
$ pip3 install e4u --user
Collecting e4u
Using cached e4u-0.2rc1.tar.gz
Collecting setuptools (from e4u)
Using cached setuptools-36.6.0-py2.py3-none-any.whl
Collecting BeautifulSoup (from e4u)
Using cached BeautifulSoup-3.2.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-uu5hdj16/BeautifulSoup/setup.py", line 22
print "Unit tests have failed!"
^
SyntaxError: Missing parentheses in call to 'print'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-uu5hdj16/BeautifulSoup/
EDIT: downgrading six
seems to have resolved this specific issue. Still working on getting everything to work though...
If I'm not mistaken it is only yowsup2
which needs python 3.
after installing through python 3 and running, we get:
Traceback (most recent call last):
File "/usr/local/bin/transwhat", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2876, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 449, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 745, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 639, in resolve
raise DistributionNotFound(req)
I think you have to use Python 2.7 because of e4u for now...
I am looking into a way to replace e4u completely.
@stv0g is there a solution already for e4u and Python 3?
No, I haven't found a replacement yet. However, I am wondering whether WhatsApp is still using the SoftBank encoding. I would expect that they switch to much more common Unicode code table...
@stv0g what exactly e4u do? convert from SoftBank encoding? How another yowsup-based app do that? We just found an active yowsup fork which requires python3, wonder how it works without e4u :)
Yes, that's the only purpose of e4u:
It converts Emojis from Softbank to Unicode encoding.
Could you try to just remove this part? Maybe WhatsApp already switched to Unicode?
Hello,
I've installed, configured prosody and just working fine for months. I got a problem with using transwhat with Spectrum2
Steps to reproduce as follows: _Note: all sensitive information below were replaced, e.g. password, domain.tld, etc._
• prosody configuration edited -
/etc/prosody/prosody.cfg.lua
, added the new component:• Spectrum2 were installed and transport were configured here:
/etc/spectrum2/transports/whatsapp.cfg
:• cloned transwhat:
• Installed dependencies that are required -
pip install --pre e4u protobuf python-dateutil yowsup2
• Preformed running python setup script:
~/transwhat# python setup.py build
and~/transwhat# python setup.py install
• Checked if backend were installed to expected place:
And finally, restarting Spectrum2
# spectrum2_manager start
and getting the following:Would you have any idea what's going on? I'll appreciate any help.