Problème script get_veolia_data du plugin Teleo

Bonjour à tous
Depuis quelques semaines, je n’ai plus de remontées du plugin, avec le message d’erreur suivant (quand je sauvegarde mon équipement) :

[2023-10-18 14:29:18]DEBUG : [Aucun][Compteur eau] le 17/10/2023 : données déjà présentes pour la commande Conso Annuelle mais Force Refresh activé
[2023-10-18 14:29:18]DEBUG : [Aucun][Compteur eau] le 17/10/2023 : données déjà présentes pour la commande Conso Hebdo mais Force Refresh activé
[2023-10-18 14:29:18]DEBUG : [Aucun][Compteur eau] le 17/10/2023 : données déjà présentes pour la commande Conso Jour mais Force Refresh activé
[2023-10-18 14:29:18]DEBUG : [Aucun][Compteur eau] le 17/10/2023 : données déjà présentes pour la commande Conso Mensuelle mais Force Refresh activé
[2023-10-18 14:29:18]DEBUG : [Aucun][Compteur eau] le 17/10/2023 : données déjà présentes pour la commande Index mais Force Refresh activé
[2023-10-18 14:29:36]INFO : [Aucun][Compteur eau] Récupération des données  - 1ère étape
[2023-10-18 14:29:36]INFO : [Aucun][Compteur eau] 1ère étape d'authentification Veolia
[2023-10-18 14:29:36]DEBUG : [Aucun][Compteur eau] Commande : sudo  /var/www/html/plugins/teleo/resources/get_veolia_data.sh IDF 'monadressemail' "monpassword" /tmp/teleo 100 monnumerodecontrat
[2023-10-18 14:29:37]WARNING : [Aucun][Compteur eau] Erreur de lancement du script : [ 0  ] consulter le log  pour plus d'info - Abandon
[2023-10-18 14:29:37]WARNING : [Aucun][Compteur eau] Erreur de récupération des données - Abandon

Suis-je le seul à avoir ce problème ?

En lançant la commande
sudo /var/www/html/plugins/teleo/resources/get_veolia_data.sh IDF etc … depuis la console jeedom, le résultat est le même : 0

Merci par avance pour vos conseils

Il me semble qu’il y a déjà des sujets ouverts.

https://community.jeedom.com/tag/plugin-teleo

Bonjour
Merci de ton retour - il y a effectivement des sujets ouverts mais pas concernant ce problème…

En complément, le log du plugin teleo_python donne une erreur :

[2023-10-18 17:19:34,180]DEBUG : [Script Python] stdout=b''
[2023-10-18 17:19:34,181]DEBUG : [Script Python] stderr=b''
[2023-10-18 17:19:34,605]DEBUG : [Script Python] command: ['Xvfb', '-br', '-nolisten', 'tcp', '-screen', '0', '800x600x24', '-displayfd', '6']
[2023-10-18 17:19:34,734]DEBUG : [Script Python] set $DISPLAY=:0
[2023-10-18 17:19:34,734]ERROR : [Script Python] __init__() got an unexpected keyword argument 'log_output'
[2023-10-18 17:19:34,735]DEBUG : [Script Python] Taking screenshot : Exception
[2023-10-18 17:19:34,735]DEBUG : [Script Python] Fermeture connexion
[2023-10-18 17:19:34,735]INFO : [Script Python] Fermeture display. Exit code 0
[2023-10-18 17:19:34,735]DEBUG : [Script Python] unset $DISPLAY
[2023-10-18 17:19:34,741]DEBUG : [Script Python] stdout=b''
[2023-10-18 17:19:34,741]DEBUG : [Script Python] stderr=b''

Merci pour votre aide

Bonjour
Suis-je le seul à avoir ce problème ?
Merci

Tu peux me dire ce que retourne la commande suivante :

pip3 list | grep -E "selenium|PyVirtualDisplay|urllib3"

et

python3 --version

Et aussi me donner le log teleo_update

Je me joins à ce topic comme demandé par Aegis.

Je ne vais pas pouvoir beaucoup t’aider, je n’arrive pas à passer la commande que tu demandes, impossible de faire le caractère | en ligne de commande dans la machine virtuelle où j’ai mon Jeedom.

Pour python ça donne :
Python 3.7.3

Et le log de teleo_update :
teleo_update.txt (24,3 Ko)

Merci beaucoup pour ta réponse - le résultat de la commande pip3 list | grep -E « selenium|PyVirtualDisplay|urllib3 » donne :

PyVirtualDisplay 3.0
selenium 3.141.0
urllib3 1.26.14

et la commande python3 --version :
Python 3.7.3

Merci pour ton investigation, en espérant que ça aide les autres également …

ET je complète avec le log teleo-update :


Installation des dépendances



Update package lists from repositories


Hit:1 Index of /debian buster InRelease
Get:2 http://deb.debian.org/debian-security buster/updates InRelease [34.8 kB]
Hit:3 Index of /debian buster-updates InRelease
Get:4 https://deb.nodesource.com/node_16.x buster InRelease [4584 B]
Get:5 http://deb.debian.org/debian-security buster/updates/main amd64 Packages [560 kB]
Fetched 600 kB in 2s (313 kB/s)
Reading package lists…


Install Firefox


Reading package lists…
Building dependency tree…
Reading state information…
firefox-esr is already the newest version (115.3.1esr-1~deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Install xvfb


Reading package lists…
Building dependency tree…
Reading state information…
xvfb is already the newest version (2:1.20.4-1+deb10u9).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Install geckodriver


Machine Hardware name:x86_64
–2023-10-18 22:07:25-- https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz
Resolving github.com (github.com)… 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/25354393/8e066757-fe10-45aa-b9a6-4b5660ff3abc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231018T220725Z&X-Amz-Expires=300&X-Amz-Signature=df806320b09e602ba24232b49a763f671f5b9b6681fe96bdecfac2c0ebb7fe4f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=25354393&response-content-disposition=attachment%3B%20filename%3Dgeckodriver-v0.32.0-linux64.tar.gz&response-content-type=application%2Foctet-stream [following]
–2023-10-18 22:07:25-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/25354393/8e066757-fe10-45aa-b9a6-4b5660ff3abc?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20231018%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231018T220725Z&X-Amz-Expires=300&X-Amz-Signature=df806320b09e602ba24232b49a763f671f5b9b6681fe96bdecfac2c0ebb7fe4f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=25354393&response-content-disposition=attachment%3B%20filename%3Dgeckodriver-v0.32.0-linux64.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)… 185.199.109.133, 185.199.110.133, 185.199.111.133, …
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 2991185 (2.9M) [application/octet-stream]
Saving to: ‹ geckodriver-v0.32.0-linux64.tar.gz ›
0K … … … … … 1% 5.68M 0s
50K … … … … … 3% 11.0M 0s
100K … … … … … 5% 9.47M 0s
150K … … … … … 6% 8.15M 0s
200K … … … … … 8% 10.5M 0s
250K … … … … … 10% 11.7M 0s
300K … … … … … 11% 9.59M 0s
350K … … … … … 13% 9.21M 0s
400K … … … … … 15% 11.1M 0s
450K … … … … … 17% 11.6M 0s
500K … … … … … 18% 10.6M 0s
550K … … … … … 20% 11.7M 0s
600K … … … … … 22% 11.6M 0s
650K … … … … … 23% 11.9M 0s
700K … … … … … 25% 10.7M 0s
750K … … … … … 27% 9.70M 0s
800K … … … … … 29% 11.0M 0s
850K … … … … … 30% 11.8M 0s
900K … … … … … 32% 11.1M 0s
950K … … … … … 34% 9.64M 0s
1000K … … … … … 35% 10.0M 0s
1050K … … … … … 37% 7.68M 0s
1100K … … … … … 39% 7.94M 0s
1150K … … … … … 41% 5.80M 0s
1200K … … … … … 42% 9.50M 0s
1250K … … … … … 44% 9.93M 0s
1300K … … … … … 46% 9.97M 0s
1350K … … … … … 47% 10.8M 0s
1400K … … … … … 49% 7.84M 0s
1450K … … … … … 51% 6.39M 0s
1500K … … … … … 53% 9.07M 0s
1550K … … … … … 54% 9.06M 0s
1600K … … … … … 56% 9.68M 0s
1650K … … … … … 58% 9.20M 0s
1700K … … … … … 59% 10.2M 0s
1750K … … … … … 61% 10.3M 0s
1800K … … … … … 63% 11.5M 0s
1850K … … … … … 65% 11.0M 0s
1900K … … … … … 66% 11.0M 0s
1950K … … … … … 68% 10.7M 0s
2000K … … … … … 70% 8.07M 0s
2050K … … … … … 71% 10.5M 0s
2100K … … … … … 73% 7.66M 0s
2150K … … … … … 75% 7.11M 0s
2200K … … … … … 77% 9.77M 0s
2250K … … … … … 78% 13.0M 0s
2300K … … … … … 80% 11.7M 0s
2350K … … … … … 82% 12.0M 0s
2400K … … … … … 83% 7.79M 0s
2450K … … … … … 85% 10.5M 0s
2500K … … … … … 87% 9.10M 0s
2550K … … … … … 89% 9.40M 0s
2600K … … … … … 90% 12.2M 0s
2650K … … … … … 92% 9.03M 0s
2700K … … … … … 94% 10.5M 0s
2750K … … … … … 95% 7.00M 0s
2800K … … … … … 97% 10.5M 0s
2850K … … … … … 99% 13.3M 0s
2900K … … . 100% 11.4M=0.3s
2023-10-18 22:07:25 (9.58 MB/s) - ‹ geckodriver-v0.32.0-linux64.tar.gz › saved [2991185/2991185]
geckodriver driver successfully installed


Install Python3 and dependencies


Reading package lists…
Building dependency tree…
Reading state information…
python3-pip is already the newest version (18.1-5).
python3 is already the newest version (3.7.3-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Python3 ‹ selenium › module


Requirement already satisfied: selenium in /usr/local/lib/python3.7/dist-packages (4.7.2)
Requirement already satisfied: urllib3[socks]~=1.26 in /usr/local/lib/python3.7/dist-packages (from selenium) (1.26.14)
Requirement already satisfied: trio~=0.17 in /usr/local/lib/python3.7/dist-packages (from selenium) (0.22.0)
Requirement already satisfied: trio-websocket~=0.9 in /usr/local/lib/python3.7/dist-packages (from selenium) (0.9.2)
Requirement already satisfied: certifi>=2021.10.8 in /usr/local/lib/python3.7/dist-packages (from selenium) (2022.12.7)
Requirement already satisfied: attrs>=19.2.0 in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (22.2.0)
Requirement already satisfied: sortedcontainers in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (2.4.0)
Requirement already satisfied: async-generator>=1.9 in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (1.10)
Requirement already satisfied: idna in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (3.4)
Requirement already satisfied: outcome in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (1.2.0)
Requirement already satisfied: sniffio in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (1.3.0)
Requirement already satisfied: exceptiongroup>=1.0.0rc9 in /usr/local/lib/python3.7/dist-packages (from trio~=0.17->selenium) (1.1.0)
Requirement already satisfied: wsproto>=0.14 in /usr/local/lib/python3.7/dist-packages (from trio-websocket~=0.9->selenium) (1.2.0)
Requirement already satisfied: PySocks!=1.5.7,<2.0,>=1.5.6 in /usr/local/lib/python3.7/dist-packages (from urllib3[socks]~=1.26->selenium) (1.7.1)
Requirement already satisfied: h11<1,>=0.9.0 in /usr/local/lib/python3.7/dist-packages (from wsproto>=0.14->trio-websocket~=0.9->selenium) (0.14.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.7/dist-packages (from h11<1,>=0.9.0->wsproto>=0.14->trio-websocket~=0.9->selenium) (4.4.0)
WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.0 documentation
[notice] A new release of pip is available: 23.2.1 → 23.3
[notice] To update, run: python3 -m pip install --upgrade pip


Python3 ‹ pyvirtualdisplay › module


Requirement already satisfied: pyvirtualdisplay in /usr/local/lib/python3.7/dist-packages (3.0)
WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.0 documentation
[notice] A new release of pip is available: 23.2.1 → 23.3
[notice] To update, run: python3 -m pip install --upgrade pip


Python3 ‹ urllib3 › module


Requirement already satisfied: urllib3 in /usr/local/lib/python3.7/dist-packages (1.26.14)
WARNING: Running pip as the ‹ root › user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: 12. Virtual Environments and Packages — Python 3.12.0 documentation
[notice] A new release of pip is available: 23.2.1 → 23.3
[notice] To update, run: python3 -m pip install --upgrade pip


Installation terminée


Résumé installation :

  1. Mozilla Firefox 115.3.1esr
  2. geckodriver :
    x86_64 geckodriver 0.32.0 (4563dd583110 2022-10-13 09:22 +0000)
    The source code of this program is available from
    testing/geckodriver in mozilla-central: Summary.
    This program is subject to the terms of the Mozilla Public License 2.0.
    You can obtain a copy of the license at Mozilla Public License, version 2.0.
  3. Packages:
    firefox-esr install
    python3-pip install
    xvfb install
  4. Python 3.7.3
  5. Python modules:
    [notice] A new release of pip is available: 23.2.1 → 23.3
    [notice] To update, run: python3 -m pip install --upgrade pip
    PyVirtualDisplay 3.0
    selenium 4.7.2
    urllib3 1.26.14

Dernier point : si je lance python3 -m pip install --upgrade pip, le résultat donne :
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /var/www/.local/lib/python3.7/site-packages (23.3)
WARNING: There was an error checking the latest version of pip.
Merci

et si tu exécutes en sudo :

sudo pip3 list | grep -E "selenium|PyVirtualDisplay|urllib3"

La réponse à sudo pip3 list | grep -E "selenium|PyVirtualDisplay|urllib3 est vide

Mais si je tapes sudo pip3 list, parmi les #70 lignes qui apparaissent, j’obtiens :
selenium 4.7.2
PyVirtualDisplay 3.0
urllib3 1.26.14

Ok, bon çà devient compliqué, @jbsers et @bpi1 semblez être tous les deux sur une VM sous buster mais vous n’avez pas la même version de selenium (4.7.2 vs 4.6.0) qui de plus n’est pas la dernière version 4.14 (disponible sous bullseye)

Je ne peux pas gérer toutes les combinaisons possible de versions Selenium 4 donc pour le moment je vous propose de revenir à la version 3 qui je sais est fonctionnelle :

sudo pip3 install selenium==3.141.0

Merci beaucoup pour tes investigations - je viens de l’installer et tout est reparti comme avant. Ma config est un jeedom sous docker sur Synology (au cas où ça t’intéresse/que ça intéresse quelqu’un).

1 « J'aime »

Pas de changement de mon coté suite au changement de version de selenium, les données ne remontent pas. Peut-être qu’il faut que j’attende le cron pour que l’update démarre ?

Est-ce que ton pb est réglé ?

Non, je n’ai toujours pas de remontées de données malheureusement.

Que donne
sudo pip3 list | grep -E "selenium" et les logs ?

selenium            3.141.0
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/logging.py", line 177, in emit
    self.console.print(renderable, overflow="ignore", crop=False, style=style)
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/console.py", line 1673, in print
    extend(render(renderable, render_options))
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/console.py", line 1305, in render
    for render_output in iter_render:
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/logging.py", line 134, in __rich_console__
    for line in lines:
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/segment.py", line 249, in split_lines
    for segment in segments:
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/console.py", line 1283, in render
    renderable = rich_cast(renderable)
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast
    renderable = cast_method()
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/self_outdated_check.py", line 130, in __rich__
    pip_cmd = get_best_invocation_for_this_pip()
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/entrypoints.py", line 60, in get_best_invocation_for_this_pip
    os.path.join(binary_prefix, exe_name),
  File "/usr/lib/python3.7/genericpath.py", line 97, in samefile
    s2 = os.stat(f2)
FileNotFoundError: [Errno 2] Aucun fichier ou dossier de ce type: '/usr/bin/pip3.7'
Call stack:
  File "/usr/local/bin/pip3", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/main.py", line 70, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
    self.handle_pip_version_check(options)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/req_command.py", line 190, in handle_pip_version_check
    pip_self_version_check(session, options)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/self_outdated_check.py", line 236, in pip_self_version_check
    logger.warning("[present-rich] %s", upgrade_prompt)
  File "/usr/lib/python3.7/logging/__init__.py", line 1395, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.7/logging/__init__.py", line 1519, in _log
    self.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1529, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1591, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 905, in handle
    self.emit(record)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/logging.py", line 179, in emit
    self.handleError(record)
Message: '[present-rich] %s'
Arguments: (UpgradePrompt(old='22.2.2', new='23.3'),)

C’est bizarre je n’ai plus de logs, c’est vide à coté de Logs dans la config du plugin.