[32_yowsup.pm] Whatsapp versenden (Mit Handy- oder Festnetznummer)

Begonnen von AHA1805, 01 Oktober 2014, 21:58:55

Vorheriges Thema - Nächstes Thema

JoWiemann

Ich vermute mal. Du bist nicht der Anleitung im Wiki gefolgt!?

Dann steht da im Wiki nichts von sudo pip install python-axolotl, sondern:


cd /opt/fhem/yowsup
sudo wget https://github.com/tgalal/python-axolotl/archive/master.zip
sudo unzip master.zip
cd python-axolotl-master
sudo python setup.py install


Und wenn /opt/fhem/yowsup nicht vorhanden ist, dann mach es doch ohne!


cd /opt
sudo wget https://github.com/tgalal/python-axolotl/archive/master.zip
sudo unzip master.zip
cd python-axolotl-master
sudo python setup.py install


Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

en-trust

#1591
habe ich dann so gemacht und beim installieren kam dann...

Reading http://pypi.python.org/simple/
No local packages or download links found for protobuf>=3.0.0.b2
error: Could not find suitable distribution for Requirement.parse('protobuf>=3.0.0.b2')


pip show protobuf ergab...

Name: protobuf
Version: 2.6.1
Location: /usr/lib/python2.7/dist-packages
Requires:

JoWiemann

Extra für Dich alle Schritte auf einem RPi mit frischem Jessie alle Schritte im Fhem Wiki nachvollzogen. Und ich habe keinen Fehler bekommen. Also bitte noch einmal folgendes durchführen:


sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python-soappy python-dateutil python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install python-axolotl
cd /opt/python-axolotl-master
sudo python setup.py install


Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

en-trust

sudo pip install --upgrade pip gescheitert...

Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1260, in prepare_files
    )[0]
IndexError: list index out of range

Storing debug log for failure in /root/.pip/pip.log

JoWiemann

Hm, bitte nur für mein Verständnis:

Auf welcher Hardware versuchst Du zu installieren?
Welches Betriebssystem?
Und, hast Du alle vorhergehenden Schritte durchgeführt und wurden diese ohne Fehler beendet?

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

en-trust

Raspberry B3 mit Raspian. Update/Upgrade ohne Probleme auch die python Installation.

JoWiemann

Prüf doch bitte einmal mit:


python -V


welche Version bei Dir installiert ist.
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM


en-trust

#1598
Habe jetzt auf python 3.6.5 umgestellt.

python3.6 -V
Python 3.6.5


Allerdings mit sudo pip install --upgrade pip springt er weiterhin auf python 2.7

File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)


Aber...

i@raspberrypi:/usr/bin $ python3.6 -m pip -V
pip 9.0.3 from /usr/local/lib/python3.6/site-packages (python 3.6)


versucht habe ich dann map mit pip3

pi@raspberrypi:/usr/bin $ sudo pip3 install python-axolotl
Requirement already satisfied: python-axolotl in /usr/local/lib/python3.4/dist-packages
Requirement already satisfied: pycrypto in /usr/local/lib/python3.4/dist-packages (from python-axolotl)
Requirement already satisfied: python-axolotl-curve25519 in /usr/local/lib/python3.4/dist-packages (from python-axolotl)
Requirement already satisfied: protobuf>=3.0.0.b2 in /usr/local/lib/python3.4/dist-packages (from python-axolotl)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from protobuf>=3.0.0.b2->python-axolotl)
Requirement already satisfied: six>=1.9 in /usr/local/lib/python3.4/dist-packages (from protobuf>=3.0.0.b2->python-axolotl)


darauf hin habe ich die Schritte unter python 3.6 ausgeführt.

cd /opt/fhem/yowsup
sudo wget https://github.com/tgalal/python-axolotl/archive/master.zip
sudo unzip master.zip
cd python-axolotl-master
sudo python3.6 setup.py install


mit folgendem ending...

Best match: setuptools 39.0.1
Adding setuptools 39.0.1 to easy-install.pth file
Installing easy_install script to /usr/local/bin
Installing easy_install-3.6 script to /usr/local/bin

Using /usr/local/lib/python3.6/site-packages
Finished processing dependencies for python-axolotl==0.1.39


muss ich jetzt noch was umstellenen ?


JoWiemann

Python 2.7.9 ist Ok. Bei Python 3.x läuft yowsup wohl nicht. Ich habe im Netz noch folgendes gefunden:

sudo python -m pip install --upgrade --force setuptools
sudo python -m pip install --upgrade --force pip

vielleicht hilft es ja.

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

en-trust

#1600
Hat sich mein update überschnitten.

Habe  sudo python -m pip install --upgrade --force setuptools versucht....

Downloading/unpacking distribute
  Downloading distribute-0.7.3.zip (145kB): 145kB downloaded
  Running setup.py (path:/tmp/pip-build-jdwcNn/distribute/setup.py) egg_info for package distribute

Downloading/unpacking setuptools>=0.7 (from distribute)
  Downloading setuptools-39.0.1-py2.py3-none-any.whl (569kB): 569kB downloaded
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1260, in prepare_files
    )[0]
IndexError: list index out of range

Storing debug log for failure in /root/.pip/pip.log


mit 3.6 gehts aber...

sudo python3.6 -m pip install --upgrade --force setuptools
sudo python3.6 -m pip install --upgrade --force pip

Collecting pip
  Using cached pip-9.0.3-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-9.0.3


ich glaub ich geb es auf

en-trust

Lässt mir doch keine Ruhe...

sudo python /opt/yowsup-master/yowsup-cli demos -c /opt/yowsup-config/yowsup.config -s 4917xxx "Das ist ein Test"

yowsup-cli  v2.0.15
yowsup      v2.5.7

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate


Traceback (most recent call last):
  File "/opt/yowsup-master/yowsup-cli", line 368, in <module>
    if not parser.process():
  File "/opt/yowsup-master/yowsup-cli", line 272, in process
    self.startSendClient()
  File "/opt/yowsup-master/yowsup-cli", line 323, in startSendClient
    not self.args["unmoxie"])
  File "/opt/yowsup-master/yowsup/demos/sendclient/stack.py", line 20, in __init__
    .pushDefaultLayers(encryptionEnabled)\
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 52, in pushDefaultLayers
    defaultLayers = YowStackBuilder.getDefaultLayers(axolotl)
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 74, in getDefaultLayers
    from yowsup.layers.axolotl import AxolotlSendLayer, AxolotlControlLayer, AxolotlReceivelayer
  File "/opt/yowsup-master/yowsup/layers/axolotl/__init__.py", line 1, in <module>
    from .layer_send import AxolotlSendLayer
  File "/opt/yowsup-master/yowsup/layers/axolotl/layer_send.py", line 3, in <module>
    from yowsup.layers.axolotl.protocolentities import *
  File "/opt/yowsup-master/yowsup/layers/axolotl/protocolentities/__init__.py", line 3, in <module>
    from .iq_keys_get_result import ResultGetKeysIqProtocolEntity
  File "/opt/yowsup-master/yowsup/layers/axolotl/protocolentities/iq_keys_get_result.py", line 4, in <module>
    from axolotl.state.prekeybundle import PreKeyBundle
ImportError: No module named axolotl.state.prekeybundle


sudo python3.6 /opt/yowsup-master/yowsup-cli demos -c /opt/yowsup-config/yowsup.config -s 4917xxx "Das ist ein Test"

Traceback (most recent call last):
  File "/opt/yowsup-master/yowsup-cli", line 368, in <module>
    if not parser.process():
  File "/opt/yowsup-master/yowsup-cli", line 272, in process
    self.startSendClient()
  File "/opt/yowsup-master/yowsup-cli", line 314, in startSendClient
    from yowsup.demos import sendclient
  File "/opt/yowsup-master/yowsup/demos/sendclient/__init__.py", line 1, in <module>
    from .stack import YowsupSendStack
  File "/opt/yowsup-master/yowsup/demos/sendclient/stack.py", line 1, in <module>
    from yowsup.stacks import  YowStackBuilder
  File "/opt/yowsup-master/yowsup/stacks/__init__.py", line 1, in <module>
    from .yowstack import YowStack, YowStackBuilder
  File "/opt/yowsup-master/yowsup/stacks/yowstack.py", line 4, in <module>
    from yowsup.layers.auth                        import YowCryptLayer, YowAuthenticationProtocolLayer
  File "/opt/yowsup-master/yowsup/layers/auth/__init__.py", line 2, in <module>
    from .layer_authentication import YowAuthenticationProtocolLayer
  File "/opt/yowsup-master/yowsup/layers/auth/layer_authentication.py", line 4, in <module>
    from yowsup.common.tools import TimeTools
  File "/opt/yowsup-master/yowsup/common/tools.py", line 3, in <module>
    from dateutil import tz
ModuleNotFoundError: No module named 'dateutil'



JoWiemann

Damit bin ich auch am Ende.

Letzter Vorschlag:

Fhem sichern.
Alles neu machen

Und das Beste hoffen

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM

en-trust

Ich hatte dieses python-axolotl nochmal deinstalliert und installiert bzw ein upgrade gemacht, aber das scheint mir gut auszusehen.
Installation war successfull und upgrade...

pi@raspberrypi:~ $ sudo pip install python-axolotl --upgrade                                                     
Requirement already up-to-date: python-axolotl in /usr/local/lib/python3.6/site-packages
Requirement already up-to-date: cryptography in /usr/local/lib/python3.6/site-packages (from python-axolotl)
Requirement already up-to-date: python-axolotl-curve25519 in /usr/local/lib/python3.6/site-packages/python_axolotl_curve25519-0.1-py3.6-linux-armv7l.egg (from python-axolotl)
Requirement already up-to-date: protobuf>=3.0.0.b2 in /usr/local/lib/python3.6/site-packages/protobuf-3.5.2.post1-py3.6.egg (from python-axolotl)
Requirement already up-to-date: cffi>=1.7; platform_python_implementation != "PyPy" in /usr/local/lib/python3.6/site-packages (from cryptography->python-axolotl)
Requirement already up-to-date: asn1crypto>=0.21.0 in /usr/local/lib/python3.6/site-packages (from cryptography->python-axolotl)
Requirement already up-to-date: idna>=2.1 in /usr/local/lib/python3.6/site-packages (from cryptography->python-axolotl)
Requirement already up-to-date: six>=1.4.1 in /usr/local/lib/python3.6/site-packages/six-1.11.0-py3.6.egg (from cryptography->python-axolotl)
Requirement already up-to-date: setuptools in /usr/local/lib/python3.6/site-packages (from protobuf>=3.0.0.b2->python-axolotl)
Requirement already up-to-date: pycparser in /usr/local/lib/python3.6/site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->python-axolotl)


und dennoch kommt beim Test ...

ImportError: No module named axolotl.state.prekeybundle

google suche sagt immer neuinstall von ax...

JoWiemann

Hallo,

ich habe heute eine neue Telefonnummer eingerichtet. Soweit alles gut. Allerdings ging mein WhatsApp Device immer wieder offline und im Log wurde folgendes protokolliert:

... yowsup.layers.axolotl.layer_receive:invalidmessage or keyid for ...

Nach einigem suchen nun die Lösung. Ich habe natürlich zunächst auf der Konsole getestet. Dabei wird unter /root das Verzeichnis .yowsup mit den Keys für die Telefonnummer angelegt. Nach dem Starten des WhatsApp device wird im im Attribut home hinterlegten Verzeichnis auch ein Verzeichnis .yowsup mit den Keys angelegt. Nachdem ich nun das Verzeichnis im /root gelöscht habe läuft alles einwandfrei. Es scheint also so zu sein, dass sich das Defaultverzeichnis und das WhatsApp-Device-Verzeichnis nicht miteinander vertragen.

Grüße Jörg
Jörg Wiemann

Slave: RPi B+ mit 512 MB, COC (868 MHz), CUL V3 (433.92MHz SlowRF); FHEMduino, Aktuelles FHEM

Master: CubieTruck; Debian; Aktuelles FHEM