asd

πŸ“… 2025-01-03T17:37:32.125Z
πŸ‘οΈ 29 katselukertaa
πŸ”“ Julkinen


Traceback (most recent call last):
  File "/root/energiaonline.py", line 40, in <module>
    fetch_daily_consumption()
  File "/root/energiaonline.py", line 6, in fetch_daily_consumption
    browser = p.firefox.launch(headless=False, args=["--ignore-certificate-errors"])
  File "/usr/local/lib/python3.10/dist-packages/playwright/sync_api/_generated.py", line 14447, in launch
    self._sync(
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_sync_base.py", line 115, in _sync
    return task.result()
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_browser_type.py", line 95, in launch
    Browser, from_channel(await self._channel.send("launch", params))
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py", line 61, in send
    return await self._connection.wrap_api_call(
  File "/usr/local/lib/python3.10/dist-packages/playwright/_impl/_connection.py", line 528, in wrap_api_call
    raise rewrite_error(error, f"{parsed_st['apiName']}: {error}") from None
playwright._impl._errors.TargetClosedError: BrowserType.launch: Target page, context or browser has been closed
Browser logs:

╔════════════════════════════════════════════════════════════════════════════════════════════════╗
β•‘ Looks like you launched a headed browser without having a XServer running.                     β•‘
β•‘ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. β•‘
β•‘                                                                                                β•‘
β•‘ <3 Playwright Team                                                                             β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
Call log:
  - <launching> /root/.cache/ms-playwright/firefox-1466/firefox/firefox -no-remote -wait-for-browser -foreground -profile /tmp/playwright_firefoxdev_profile-tVa6hU -juggler-pipe --ignore-certificate-errors -silent
  -   - <launched> pid=52507
  -   - [pid=52507][err] Error: no DISPLAY environment variable specified
  -   - [pid=52507] <process did exit: exitCode=1, signal=null>
  -   - [pid=52507] starting temporary directories cleanup