Closed gvwilson closed 1 week ago
$ .venv/bin/dtdoctor
**************************************************
*****Collecting information about the system:*****
Linux
5.15.146.1-microsoft-standard-WSL2
#1 SMP Thu Jan 11 04:09:03 UTC 2024
uname_result(system='Linux', node='DESKTOP-72DNRM8', release='5.15.146.1-microsoft-standard-WSL2', version='#1 SMP Thu Jan 11 04:09:03 UTC 2024', machine='x86_64')
***************Looking for browser:***************
looking for chrome
looking for None
looking for Chrome
looking for None
looking for google-chrome
looking for None
looking for google-chrome-stable
looking for None
looking for Chrome.app
looking for None
looking for Google Chrome
looking for None
looking for Google Chrome.app
looking for None
looking for chromium
looking for /snap/bin/chromium
/snap/bin/chromium
************Looking for version info:*************
/tmp/kal/.venv/bin/python3: No module named pip
*************Done with version info.**************
****************Sync test headless****************
DEBUG REPORT:
BROWSER_PATH: /snap/bin/chromium
USER_DATA_DIR: /tmp/tmpc1bsqfl0
Old Headless mode will be removed from the Chrome binary soon. Please use the new Headless mode (https://developer.chrome.com/docs/chromium/new-headless) or the chrome-headless-shell which is a standalone implementation of the old Headless mode (https://developer.chrome.com/blog/chrome-headless-shell).
[1025/051913.968305:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
[1025/051913.972788:WARNING:viz_main_impl.cc(85)] VizNullHypothesis is disabled (not a warning)
write_json:
write_json: {"id": 0, "method": "Browser.close"}
wrote_json.
[1025/051915.892264:ERROR:devtools_pipe_handler.cc(188)] Connection terminated while reading from pipe
[1025/051915.892865:ERROR:devtools_pipe_handler.cc(273)] Could not write into pipe
[1025/051915.892906:ERROR:devtools_pipe_handler.cc(273)] Could not write into pipe
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
pipe.close() (or slow Browser.close) method closed browser
Tempfile still exists?: False
***********Done with sync test headless***********
***************Async Test headless****************
DEBUG REPORT:
BROWSER_PATH: /snap/bin/chromium
USER_DATA_DIR: /tmp/tmpyec2k4kv
read_jsons (blocking):
write_json:
write_json: {"id": 0, "method": "Target.getTargets"}
wrote_json.
Starting watchdog
Old Headless mode will be removed from the Chrome binary soon. Please use the new Headless mode (https://developer.chrome.com/docs/chromium/new-headless) or the chrome-headless-shell which is a standalone implementation of the old Headless mode (https://developer.chrome.com/blog/chrome-headless-shell).
[1025/051916.469567:WARNING:sandbox_linux.cc(430)] InitializeSandbox() called with multiple threads in process gpu-process.
[1025/051916.471829:WARNING:viz_main_impl.cc(85)] VizNullHypothesis is disabled (not a warning)
{"id":0,"result":{"targetInfos":[]}}
read_jsons: {'id': 0, 'result': {'targetInfos': []}}
run_read_loop() found future for key ('', 0)
read_jsons (blocking):
is_closed called with wait: 0
write_json:
write_json: {"id": 1, "method": "Browser.close"}
wrote_json.
{"id":1,"result":{}}
read_jsons: {'id': 1, 'result': {}}
run_read_loop() found future for key ('', 1)
is_closed called with wait: 0
read_jsons (blocking):
read_jsons pipe was closed, raising
caught OSError in read()
PipeClosedError caught
Browser is being closed because chrom* closed
Browser.close method closed browser
Tempfile still exists?: False
**********Done with async test headless***********
Error in: System Info
Traceback (most recent call last):
File "/tmp/kal/.venv/lib/python3.11/site-packages/choreographer/browser.py", line 735, in diagnose
print(subprocess.check_output([sys.executable, '-m', 'pip', 'freeze']))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ali/.local/share/uv/python/cpython-3.11.9-linux-x86_64-gnu/lib/python3.11/subprocess.py", line 466, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ali/.local/share/uv/python/cpython-3.11.9-linux-x86_64-gnu/lib/python3.11/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/tmp/kal/.venv/bin/python3', '-m', 'pip', 'freeze']' returned non-zero exit status 1.
Traceback (most recent call last):
File "/tmp/kal/.venv/bin/dtdoctor", line 8, in <module>
sys.exit(diagnose())
^^^^^^^^^^
File "/tmp/kal/.venv/lib/python3.11/site-packages/choreographer/browser.py", line 777, in diagnose
raise BaseException("There was an exception, see above.")
BaseException: There was an exception, see above.
Compiling important parts here:
$ .venv/bin/python test.py
Traceback (most recent call last):
File "/tmp/kal/.venv/lib/python3.11/site-packages/kaleido/__init__.py", line 82, in to_image
js_response = json.loads(response.get("result").get("result").get("value"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ali/.local/share/uv/python/cpython-3.11.9-linux-x86_64-gnu/lib/python3.11/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType
RuntimeError:
{'id': 3,
'result': {
'result': {
'type': 'object',
'subtype': 'error',
'className': 'ReferenceError',
'description': 'ReferenceError: kaleido_scopes is not defined\n at <anonymous>:1:73', 'objectId': '78168610404079178.2.2'}, 'exceptionDetails': {'exceptionId': 1, 'text': 'Uncaught', 'lineNumber': 0, 'columnNumber': 72, 'scriptId': '4', 'stackTrace': {'callFrames': [{'functionName': '', 'scriptId': '4', 'url': '', 'lineNumber': 0, 'columnNumber': 72}]}, 'exception': {'type': 'object', 'subtype': 'error', 'className': 'ReferenceError', 'description': 'ReferenceError: kaleido_scopes is not defined\n at <anonymous>:1:73', 'objectId': '78168610404079178.2.3'}}}, 'sessionId': '069DAC5009E6A686F51191EFE53F4DBE'}
FYI this is chromium reporting a javascript error. I'm going to improve the debugging, install WSL, and debug this myself.
It's probably a path issue.
So @gvwilson AFAIK this should work w/ the new release candidate.
Closed because likely solved