rsconnect-python
rsconnect-python copied to clipboard
When deploying Jupyter notebooks `--static` doesn't work.
Using a minimal Jupyter notebook (attached), rsconnect 1.25.2 can deploy a notebook with --static:
~/src/piece-work via 🐍 v3.12.8 (.venv.3.12.8) via ⨁ v1.9.8 on ☁️ (us-west-2) took 3s
[ 10:32:53 ] ❯ rsconnect deploy notebook --static rsconnect-test.ipynb
Warning: Capturing the environment using 'pip freeze --disable-pip-version-check'.
Consider creating a requirements.txt file instead.
Validating server... [OK]
Validating app mode... [OK]
Making bundle ... [OK]
Deploying bundle ... [OK]
Saving deployed information... [OK]
Building static content...
Launching static content...
Deployment completed successfully.
Dashboard content URL: https://connect.posit.it/connect/#/apps/41b824e0-dc4a-45ac-8507-497da1552747/access
Direct content URL: https://connect.posit.it/content/41b824e0-dc4a-45ac-8507-497da1552747/
Verifying deployed content... [OK]
Upgrading to rsconnect 1.27.1, this no longer works, with the following error:
~/src/piece-work via ⨁ v1.9.8 on ☁️ (us-west-2)
[ 10:37:10 ] ❯ python --version
Python 3.13.3
~/src/piece-work via ⨁ v1.9.8 on ☁️ (us-west-2)
[ 10:38:46 ] ❯ rsconnect version
1.27.1
~/src/piece-work via ⨁ v1.9.8 on ☁️ (us-west-2)
[ 10:39:04 ] ❯ rsconnect deploy notebook --static rsconnect-test.ipynb
Validating server... [OK]
Validating app mode... [OK]
Making bundle ... [ERROR]: Unable to include the file 3.12.1 in the bundle: No such file or directory
Error: Unable to include the file 3.12.1 in the bundle: No such file or directory
Note that the version of Python is incorrect in the error message.
Seen in internal ticket 124109. Thanks!
Also, taking out the --static (and depending on situation, replacing with -new), works. It's just with the --static flag.