Cannot deploy python shiny app to shinyapps.io - Exception: Child Task 1234081549 failed

I have a simple test python shiny app that works locally, and rsconnect is linked to my shinyapps.io account. When I try to deploy the app to shinyapps.io, I get the below error message and the app shows up as undeployed on my dashboard (see screenshot).

Any help in resolving this issue would be appreciated. Thanks!

    Warning: Capturing the environment using 'pip freeze'.
             Consider creating a requirements.txt file instead.

Waiting for task: 1234081541
  building - None
  building - Installing files
  building - Installing files
  building - Installing files
Error: shinyapps.io reported an error (calling /v1/tasks/1234081541?legacy=true): Unhandled Exception: Child Task 1234081549 failed: Error building image: Build exited with non-zero status: 1

Hi,
I had the same problem with a very similar error (although mine says " Error parsing manifest: Bundle does not contain manifest file: pycache\app.cpython-310.pyc" instead of "Error building image"). After I tried to deploy the app I got the same warning about using 'pip freeze' and making requirements.txt. In the folder with my app in it, a .pyc file was created that was apparently not working. I had to delete this and make a requirements.txt file and the next time I tried to deploy it went off without a hitch. Hope this helps, sorry if it's not quite the same thing that happened to you.

Hey! I also got a similar error (Unhandled Exception: Child Task 1237242497 failed: Error building image: Build exited with non-zero status: 1) and it was because my Python version was 3.10. So I downgraded to python 3.9.13 and I was able to successfully deploy my dashboard. Hopefully this could be a possible solution for you too.

Reference under "2.2.2.3 Managing Python versions": Chapter 2 Getting Started | shinyapps.io user guide

I have the same issue as @DavidLH3 . Tried to deploy demo app and got the same error:

Error: shinyapps.io reported an error (calling /v1/tasks/1238286345?legacy=true): Unhandled Exception: Child Task 1238286346 failed: Error building image: Build exited with non-zero status: 1

My Python version is 3.9.13. I created requirements.txt and it does not work.

In addition, locally the app works on the localhost:8000

Will be following this tread for other suggestions

Hi everyone, thanks for the suggestions. I was able to solve this issue, and deploy my app to shinyapps.io using a python 3.8.13 virtual conda environment (instead of 3.9.7 as I tried previously) and rsconnect-python 1.10.0.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.