Git Product home page Git Product logo

Comments (13)

joaoricardo000 avatar joaoricardo000 commented on June 18, 2024

Hi,
that's weird...
Can you tell me more about your environment? Python version, OS...

Looks like just this would solve it, but I don't know why are you having this problem in the first place..

_build_file_path id = hashlib.md5(text.encode("UTF-8")).hexdigest()

from whatsapp-bot-seed.

e0xify avatar e0xify commented on June 18, 2024

Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty

hm okay i will give it a try, but then i have to edit it in all files :/

from whatsapp-bot-seed.

joaoricardo000 avatar joaoricardo000 commented on June 18, 2024

Yeah... probably python 3.4. Right now we are using 2.7.
Better if you just use a virtualenv of 2.7 to run the bot...

from whatsapp-bot-seed.

e0xify avatar e0xify commented on June 18, 2024

hm allright mate, maybe i'll find a way to get python 3.4 replaced with 2.7...
thanks ! i'll give feedback

from whatsapp-bot-seed.

joaoricardo000 avatar joaoricardo000 commented on June 18, 2024

Just install 2.7, and create a virtualenv like this:
virtualenv -p /usr/bin/python2.7 venv
No need to replace or remove 3.4..

from whatsapp-bot-seed.

e0xify avatar e0xify commented on June 18, 2024

ahh

gimme a second , i think i fu**ed it up.
compiled it from source

root@h2476922:/home/Python-2.7.9# python -V
bash: /usr/bin/python3: No such file or directory
root@h2476922:/home/Python-2.7.9# virtualenv -p /usr/bin/python2.7
bash: virtualenv: command not foun

from whatsapp-bot-seed.

e0xify avatar e0xify commented on June 18, 2024
root@h2476922:/home/scripts/wabot/test/whatsapp-bot-seed# pip install yowsup2                                                                                                                                      
Requirement already satisfied (use --upgrade to upgrade): yowsup2 in /usr/local/lib/python2.7/dist-packages                                                                                                        
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/lib/python2.7/dist-packages (from yowsup2)                                                                                       
Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.7 (from yowsup2)                                                                                                            
Requirement already satisfied (use --upgrade to upgrade): python-axolotl>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from yowsup2)                                                                           
Requirement already satisfied (use --upgrade to upgrade): pillow in /usr/lib/python2.7/dist-packages (from yowsup2)                                                                                                
Requirement already satisfied (use --upgrade to upgrade): protobuf>=2.6,<3.0.0-alpha-2 in /usr/local/lib/python2.7/dist-packages (from python-axolotl>=0.1.7->yowsup2)                                             
Requirement already satisfied (use --upgrade to upgrade): pycrypto in /usr/lib/python2.7/dist-packages (from python-axolotl>=0.1.7->yowsup2)                                                                       
Requirement already satisfied (use --upgrade to upgrade): python-axolotl-curve25519 in /usr/local/lib/python2.7/dist-packages (from python-axolotl>=0.1.7->yowsup2)                                                
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from protobuf>=2.6,<3.0.0-alpha-2->python-axolotl>=0.1.7->yowsup2)                                       
Cleaning up...                                                                                                                                                                                                     
root@h2476922:/home/scripts/wabot/test/whatsapp-bot-seed# python src/server.py                                                                                                                                     
Traceback (most recent call last):                                                                                                                                                                                 
  File "src/server.py", line 10, in <module>                                                                                                                                                                       
    from yowsup.layers import YowLayerEvent, YowParallelLayer                                                                                                                                                      
ImportError: No module named yowsup.layers 

if im using the yowsup-cli command its working fine

changing to python3 the bot starts, changing back to 2.7 i get the yowsup error

from whatsapp-bot-seed.

joaoricardo000 avatar joaoricardo000 commented on June 18, 2024

If you run the "pip" out of an virtualenv, it will install on default python, in your case 3.4.
Try this steps:


> virtualenv -p /usr/bin/python2.7 venv (or where is your python2.7 bin)
> source venv/bin/activate  (activate the virtualenv)
> pip install -r opt/requirements.txt (install the requirements on the virtualenv)
> python src/server.py  (with the venv activated, run...)

from whatsapp-bot-seed.

e0xify avatar e0xify commented on June 18, 2024

cant use the virtualenv command, cause its not recogized, i removed python 3 and used alias command to use python2.7.

when i install the requirements now, i get this error by installing pillow:

/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libjpeg.a(jcapimin.o): relocation R_X86_64_32S againstjpeg_natural_order' can not be used when making a shared object; recompile with -fPIC
/usr/lib/x86_64-linux-gnu/libjpeg.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------                                                                                                                                                                       

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-build-Y3DtTh/pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec')
)" install --record /tmp/pip-NYA1X1-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-Y3DtTh/pillow`

like 2 hours, getting it not fixxed

from whatsapp-bot-seed.

joaoricardo000 avatar joaoricardo000 commented on June 18, 2024

Yes.. I tried to change the default python version on Ubuntu about 3 years ago... I remember it really was a pain, and it was the only time that I tried it.
I'm working on a Dockerfile to isolate all enviroments requirement for the bot. Until then I wish you good luck...

from whatsapp-bot-seed.

e0xify avatar e0xify commented on June 18, 2024

installed virtualenv
installed dependencies
working fine

from whatsapp-bot-seed.

joaoricardo000 avatar joaoricardo000 commented on June 18, 2024

Nice!

from whatsapp-bot-seed.

e0xify avatar e0xify commented on June 18, 2024

@joaoricardo000 what are you using for tts?

is there a way to get it slower? or support multilanguage?

from whatsapp-bot-seed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.