plotly / choreographer

MIT License
3 stars 2 forks source link

Windows chokes on "delete" keyword in TemporaryDirectory on GHA #88

Closed ayjayt closed 1 month ago

ayjayt commented 1 month ago

Is powershell:

Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\Scripts\devtools-doctor.exe\__main__.py", line 7, in <module>
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\devtools\browser.py", line [5](https://github.com/plotly/devtools_protocol/actions/runs/11058846893/job/30725797303#step:6:6)54, in diagnose
    asyncio.run(test())
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\hostedtoolcache\windows\Python\3.9.13\x[6](https://github.com/plotly/devtools_protocol/actions/runs/11058846893/job/30725797303#step:6:7)4\lib\asyncio\base_events.py", line 647, in run_until_complete
    return future.result()
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\devtools\browser.py", line 551, in test
    browser = await Browser(debug=True, debug_browser=True)
  File "C:\hostedtoolcache\windows\Python\3.9.13\x64\lib\site-packages\devtools\browser.py", line 61, in __init__
*****************************************
Please copy and paste all these results to an issue or to slack!
    self.temp_dir = tempfile.TemporaryDirectory(
TypeError: __init__() got an unexpected keyword argument 'delete'
Collecting information about the system:
Windows
10
10.0.20348
uname_result(system='Windows', node='fv-az901-654', release='10', version='10.0.20348', machine='AMD64')
Looking for browser:
C:\Program Files\Google\Chrome\Application\chrome.exe
Running a very simple test...
b'argcomplete==3.5.0\r\nclick==8.1.[7](https://github.com/plotly/devtools_protocol/actions/runs/11058846893/job/30725797303#step:6:8)\r\ncolorama==0.4.6\r\ndevtools @ file:///D:/a/devtools_protocol/devtools_protocol\r\nexceptiongroup==1.2.2\r\niniconfig==2.0.0\r\nnumpy==2.0.2\r\npackaging==24.1\r\npipx==1.7.1\r\nplatformdirs==4.3.6\r\npluggy==1.5.0\r\npytest==[8](https://github.com/plotly/devtools_protocol/actions/runs/11058846893/job/30725797303#step:6:9).3.3\r\ntomli==2.0.1\r\nuserpath==1.[9](https://github.com/plotly/devtools_protocol/actions/runs/11058846893/job/30725797303#step:6:10).2\r\n'
b'remotes/pull/84/merge-0-gccf8ca4\n'
Error: Process completed with exit code 1.
ayjayt commented 1 month ago

git-bash on my local:

$ dtdoctor.exe
read_jsons (blocking):
write_json:
write_json: {"id": 0, "method": "Target.getTargets"}
[2892:7576:0927/112833.472:WARNING:chrome_main_delegate.cc(747)] This is Chrome version 129.0.6668.60 (not a warning)
[2892:7576:0927/112833.532:INFO:chrome_browser_cloud_management_controller.cc(196)] No machine level policy manager exists.
[2892:9088:0927/112833.570:WARNING:external_pref_loader.cc(294)] You are using an old-style extension deployment method (external_extensions.json), which will soon be deprecated. (see http://developer.chrome.com/docs/extensions/how-to/distribute/install-extensions)
[2892:7576:0927/112833.623:WARNING:external_registry_loader_win.cc(232)] Error observing HKLM: 5
read_jsons: {'id': 0, 'result': {'targetInfos': [{'targetId': '96390906E78DC3E4E74BBDFCE76D4377', 'type': 'background_page', 'title': 'Google Network Speech', 'url': '', 'attached': False, 'canAccessOpener': False, 'browserContextId': '674857047EEAE3D1BD30AFA4F4ADF52E'}, {'targetId': '1A0EC3D02B395FAF7D546ADBC273FD09', 'type': 'background_page', 'title': 'Google Hangouts', 'url': '', 'attached': False, 'canAccessOpener': False, 'browserContextId': '674857047EEAE3D1BD30AFA4F4ADF52E'}, {'targetId': '1FFEFC84BBA602D946AEE5F31F07DCE5', 'type': 'page', 'title': 'New Tab', 'url': 'chrome://newtab/', 'attached': False, 'canAccessOpener': False, 'browserContextId': '674857047EEAE3D1BD30AFA4F4ADF52E'}]}}
write_json:
read_jsons (blocking):
write_json: {"id": 1, "method": "Target.attachToTarget", "params": {"targetId": "1FFEFC84BBA602D946AEE5F31F07DCE5", "flatten": true}}
read_jsons: {'method': 'Target.attachedToTarget', 'params': {'sessionId': 'A0B65E97C1C6092AAB61B68667884EE0', 'targetInfo': {'targetId': '1FFEFC84BBA602D946AEE5F31F07DCE5', 'type': 'page', 'title': 'New Tab', 'url': 'chrome://newtab/', 'attached': True, 'canAccessOpener': False, 'browserContextId': '674857047EEAE3D1BD30AFA4F4ADF52E'}, 'waitingForDebugger': False}}
read_jsons: {'id': 1, 'result': {'sessionId': 'A0B65E97C1C6092AAB61B68667884EE0'}}
Checking subscription key: Target.detachedFromTarget against event method Target.attachedToTarget
The target 1FFEFC84BBA602D946AEE5F31F07DCE5 was added
read_jsons (blocking):
write_json:
write_json: {"id": 2, "method": "Browser.close"}
read_jsons: {'id': 2, 'result': {}}
read_jsons (blocking):
read_jsons: {'method': 'Target.detachedFromTarget', 'params': {'sessionId': 'A0B65E97C1C6092AAB61B68667884EE0', 'targetId': '1FFEFC84BBA602D946AEE5F31F07DCE5'}}
Checking subscription key: Target.detachedFromTarget against event method Target.detachedFromTarget
read_jsons (blocking):
PipeClosedError caught
*****************************************
Please copy and paste all these results to an issue or to slack!
Collecting information about the system:
Windows
10
10.0.19045
uname_result(system='Windows', node='DESKTOP-0GG9AE4', release='10', version='10.0.19045', machine='AMD64')
Looking for browser:
C:\Program Files\Google\Chrome\Application\chrome.exe
Running a very simple test...
b'anyio==4.4.0\r\nargon2-cffi==23.1.0\r\nargon2-cffi-bindings==21.2.0\r\narrow==1.3.0\r\nasttokens==2.4.1\r\nasync-lru==2.0.4\r\nattrs==24.2.0\r\nbabel==2.16.0\r\nbeautifulsoup4==4.12.3\r\nbleach==6.1.0\r\ncertifi==2024.8.30\r\ncffi==1.17.1\r\ncharset-normalizer==3.3.2\r\ncolorama==0.4.6\r\ncomm==0.2.2\r\ndebugpy==1.8.5\r\ndecorator==5.1.1\r\ndefusedxml==0.7.1\r\n-e git+ssh://git@github.com/geopozo/devtools_protocol@7aa90fab3371de2131091cd02fa9dff3aac117a5#egg=devtools\r\nexecuting==2.1.0\r\nfastjsonschema==2.20.0\r\nfqdn==1.5.1\r\nh11==0.14.0\r\nhttpcore==1.0.5\r\nhttpx==0.27.2\r\nidna==3.10\r\nipykernel==6.29.5\r\nipython==8.27.0\r\nisoduration==20.11.0\r\njedi==0.19.1\r\nJinja2==3.1.4\r\njson5==0.9.25\r\njsonpointer==3.0.0\r\njsonschema==4.23.0\r\njsonschema-specifications==2023.12.1\r\njupyter-events==0.10.0\r\njupyter-lsp==2.2.5\r\njupyter_client==8.6.2\r\njupyter_core==5.7.2\r\njupyter_server==2.14.2\r\njupyter_server_terminals==0.5.3\r\njupyterlab==4.2.5\r\njupyterlab_pygments==0.3.0\r\njupyterlab_server==2.27.3\r\nMarkupSafe==2.1.5\r\nmatplotlib-inline==0.1.7\r\nmistune==3.0.2\r\nnbclient==0.10.0\r\nnbconvert==7.16.4\r\nnbformat==5.10.4\r\nnest-asyncio==1.6.0\r\nnotebook==7.2.2\r\nnotebook_shim==0.2.4\r\nnumpy==2.1.1\r\noverrides==7.7.0\r\npackaging==24.1\r\npandas==2.2.2\r\npandocfilters==1.5.1\r\nparso==0.8.4\r\nplatformdirs==4.3.3\r\nplotly==5.24.1\r\nprometheus_client==0.20.0\r\nprompt_toolkit==3.0.47\r\npsutil==6.0.0\r\npure_eval==0.2.3\r\npycparser==2.22\r\nPygments==2.18.0\r\npython-dateutil==2.9.0.post0\r\npython-json-logger==2.0.7\r\npytz==2024.2\r\npywin32==306\r\npywinpty==2.0.13\r\nPyYAML==6.0.2\r\npyzmq==26.2.0\r\nreferencing==0.35.1\r\nrequests==2.32.3\r\nrfc3339-validator==0.1.4\r\nrfc3986-validator==0.1.1\r\nrpds-py==0.20.0\r\nSend2Trash==1.8.3\r\nsetuptools==72.1.0\r\nsix==1.16.0\r\nsniffio==1.3.1\r\nsoupsieve==2.6\r\nstack-data==0.6.3\r\ntenacity==9.0.0\r\nterminado==0.18.1\r\ntinycss2==1.3.0\r\ntornado==6.4.1\r\ntraitlets==5.14.3\r\ntypes-python-dateutil==2.9.0.20240906\r\ntzdata==2024.1\r\nuri-template==1.3.0\r\nurllib3==2.2.3\r\nwcwidth==0.2.13\r\nwebcolors==24.8.0\r\nwebencodings==0.5.1\r\nwebsocket-client==1.8.0\r\nwheel==0.43.0\r\n'
b'heads/andrew/circle_ci-to-github_actions-0-g7aa90fa\n'
3.12.4 | packaged by Anaconda, Inc. | (main, Jun 18 2024, 15:03:56) [MSC v.1929 64 bit (AMD64)]
sys.version_info(major=3, minor=12, micro=4, releaselevel='final', serial=0)
DEBUG REPORT:
BROWSER_PATH: C:\Program Files\Google\Chrome\Application\chrome.exe
USER_DATA_DIR: C:\Users\ajpik\AppData\Local\Temp\tmpfncesz7w
run_read_loop() found future foor key ('', 0)
run_read_loop() found future foor key ('', 1)
run_read_loop() found future foor key ('', 2)
read_jsons pipe was closed, raising
Thank you! Please share these results with us!
(devtools)
ayjayt commented 1 month ago

python 3.9 doesn't support the keyword

ayjayt commented 1 month ago

https://github.com/plotly/devtools_protocol/pull/89

ayjayt commented 1 month ago

in general tmp dirs need attention but lets get some other PRs up first