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

Problème au lancement Chromium : 'DevToolsActivePort file doesn't exist' #25

Open
LD40 opened this issue Jul 22, 2024 · 1 comment
Open

Comments

@LD40
Copy link

LD40 commented Jul 22, 2024

Impossible de faire fonctionner la collecte Veolia, suite à l'erreur systématique suivante :

python3  MetersToHA/apps/meters_to_ha/meters_to_ha.py  -l /config --screenshot --keep-output -c "/m2h_config.json" --veolia -r
Traceback (most recent call last):
  File "//MetersToHA/apps/meters_to_ha/meters_to_ha.py", line 3428, in doWork
    crawler.init()
  File "//MetersToHA/apps/meters_to_ha/meters_to_ha.py", line 523, in init
    self.init_chromium()
  File "//MetersToHA/apps/meters_to_ha/meters_to_ha.py", line 793, in init_chromium
    browser = webdriver.Chrome(
              ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.py", line 45, in __init__
    super().__init__(
  File "/usr/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.py", line 56, in __init__
    super().__init__(
  File "/usr/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 208, in __init__
    self.start_session(capabilities)
  File "/usr/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 292, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 347, in execute
    self.error_handler.check_response(response)
  File "/usr/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 229, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: DevToolsActivePort file doesn't exist
@mdeweerd
Copy link
Owner

Comment vous lancez MetersToHA: local sous linux/windows, docker sous win/linux, ou module sous HA.

J'avais passé pas mal d'effort à éviter cela - il y a plusieurs causes possible, dont la version. Il y a aussi firefox comme alternative.

Le divers methodes que je teste fonctionnent. C.a.d. docker sous windows (mais désormais cela pose un petit souci avec un module python), le module complémentaire sous HA, et windows natif (je teste avec MobaXTerm).

Essayez sous docker, et testez avec firefox si possible. Le module sous HAOS ne devrait pas poser de problème, mais on ne sait jamais.

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

2 participants