Skip to content

potentially misleading permissions error when incorrectly specifying python path #242

@dpastoor

Description

@dpastoor

one of the solutions engineers reported an issue:

 rsconnect deploy fastapi -n connect_server -p .venv/ --entrypoint superbowlads:api ./
Checking arguments...                            [OK]
    Deploying ./ to server "https://SERVER.EXAMPLE.COM"
    Warning: Capturing the environment using 'pip freeze'.
             Consider creating a requirements.txt file instead.
Inspecting Python environment...                 Traceback (most recent call last):
  File "/USERHOME/PATH/TO/.venv/lib/python3.9/site-packages/rsconnect/actions.py", line 74, in cli_feedback
    yield
.....
PermissionError: [Errno 13] Permission denied: '.venv/'
[ERROR]
Internal error: [Errno 13] Permission denied: '.venv/'

after consulting the docs and some back and forth realized -p needed the path to the python executable.

My hypothesis is that the check https://github.com/rstudio/rsconnect-python/blob/master/rsconnect/actions.py#L111 may need to be slightly more restrictive to check if its actually a file.

I'll try to replicate/get a PR over but filing this issue as the starting point.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions