Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error generating Quarto manifest due to hanging get_python_env_info() argument #524

Closed
wilssh opened this issue Nov 22, 2023 · 0 comments · Fixed by #530
Closed

Error generating Quarto manifest due to hanging get_python_env_info() argument #524

wilssh opened this issue Nov 22, 2023 · 0 comments · Fixed by #530

Comments

@wilssh
Copy link

wilssh commented Nov 22, 2023

Bug Description. Using rsconnect-python==1.21.0 to generate a manifest for a Python-based Quarto project:

rsconnect write-manifest quarto .

leads to error

Checking arguments...                            [OK]
Inspecting Quarto project...                     [OK]
Inspecting Python environment...                 Traceback (most recent call last):
  File "my-proj/venv/lib/python3.8/site-packages/rsconnect/actions.py", line 87, in cli_feedback
    yield
  File "my-proj/venv/lib/python3.8/site-packages/rsconnect/main.py", line 1716, in write_manifest_quarto
    python, environment = get_python_env_info(base_dir, python, False, force_generate)
TypeError: get_python_env_info() takes from 2 to 3 positional arguments but 4 were given
[ERROR]
Internal error: get_python_env_info() takes from 2 to 3 positional arguments but 4 were given

Steps to Reproduce. Create a Quarto project with _quarto.yml contents:

project:
  title: "my-proj"

and my-proj.qmd contents:

---
title: "my-proj"
---

```{python}
print("Bug reprex.")
```

Then try to generate a manifest with rsconnect-python==1.21.0:

rsconnect write-manifest quarto .

Expected Behavior. With rsconnect-python==1.20.0, the output is as expected:

$ rsconnect write-manifest quarto .
Checking arguments...                            [OK]
Inspecting Quarto project...                     [OK]
Inspecting Python environment...                 [OK]
Creating requirements.txt...                     [OK]
Creating manifest.json...                        [OK]

Additional context. @adamwangdata and I deploy Git-backed content onto our Connect Server.
We recently upgraded to rsconnect-python==1.21.0 and have had issues generating manifest.json for Python-based Quarto documents.

We suspect this is due to the removal of the Conda flag and the lingering reference to it here:
https://github.com/rstudio/rsconnect-python/blob/5c8a21e504ccef4dc566ec7a14d317c76e7d2deb/rsconnect/main.py#L1775

Removing the third False argument alleviates the issue. Also related: #522.

We're happy to open a PR or provide any additional info!

@wilssh wilssh changed the title Error generating Quarto manifest due to extra get_python_env_info() argument Error generating Quarto manifest due to hanging get_python_env_info() argument Nov 22, 2023
edavidaja added a commit that referenced this issue Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant