Skip to content

[Errno 13] Permission denied when creating a session on MacOS installed through UV. #471

@dfraze

Description

@dfraze

When using astral's UV to install copilot-python-sdk, I get a permission error when running the samples:

Traceback (most recent call last):
  File "/private/tmp/ghtest/main.py", line 44, in <module>
    asyncio.run(main())
  File "/opt/homebrew/Cellar/python@3.11/3.11.14_3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.14_3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.14_3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 654, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/private/tmp/ghtest/main.py", line 11, in main
    await client.start()
  File "/private/tmp/ghtest/.venv/lib/python3.11/site-packages/copilot/client.py", line 276, in start
    await self._start_cli_server()
  File "/private/tmp/ghtest/.venv/lib/python3.11/site-packages/copilot/client.py", line 1149, in _start_cli_server
    self._process = subprocess.Popen(
                    ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.14_3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/opt/homebrew/Cellar/python@3.11/3.11.14_3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: '/private/tmp/ghtest/.venv/lib/python3.11/site-packages/copilot/bin/copilot'

It's easy to fix with chmod +x, but it would be nice if this could be done automatically.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions