Unable to deploy a Python Shiny app to shinyapps.io although it runs locally on my computer

I receive the following error when I try to run the app on the terminal:

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

←[0mValidating server...←[0m←[32;20m [OK]
←[0m←[0mValidating app mode...←[0m←[32;20m [OK]
←[0m←[0mMaking bundle ...←[0m←[32;20m [OK]
←[0m←[0mDeploying bundle ...←[0m
Waiting for task: 1319051531
building - Processing bundle: 7467213
building - Installing files
building - Installing files
building - Installing files
←[31;20m [ERROR]: Application deployment failed with error: Unhandled Exception: Child Task 1319051533 failed: Error building image: Build exited with non-zero status: 1
←[0mError: Application deployment failed with error: Unhandled Exception: Child Task 1319051533 failed: Error building image: Build exited with non-zero status: 1

I also am experiencing this issue. I have tried a couple of the versions of Python and rsconnect-python with no success. I have tried using requirements files and and the manifest.json

Hi Gulshan,

Thank you for your suggestion, I have tried the following steps, but still have errors. @normana is also experiencing errors too. Could you please take a closer look or give it a try?

As was suggested in a warning, I created a requirements.txt file by running

pip freeze > requirements.txt

Then, as was discussed in this post with a similar error Cannot deploy python shiny app to shinyapps.io - Exception: Child Task 1234081549 failed - shiny / shinyapps.io - Posit Community (rstudio.com)

I created and used a python 3.8.13 virtual conda environment

conda create -n test_env python=3.8.13 anaconda

conda activate test_env

I also ensured I was running rsconnect 1.10.0

pip install rsconnect-python==1.10.0

The error persists and was not fixed.

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

I have double-checked my commands and followed the procedures as contained in the Shiny documentation. Chapter 2 Getting Started | shinyapps.io user guide (posit.co)

Could you please help?

Thank you,

Paul

I am also experimenting the exact same issue. I was thinking that it could be because my app uses yfinance package, but it does not fit in the categories of packages that does not work on shinyapps.io.
I would really appreciate your help

I had some success getting my application deployed including packages like xgboost for a prediction model, plotly for a dynamic graph, boto3 and other libraries for AWS S3 connections.

I found success by first creating a project with just the bare components like the UI and plotly. I also created a requriements.txt file where said the name ie 'plotly' or 'scipy' . This deployed and then within my project the rsconnect-python json file was created.

After deploying this and being able to access and add users, I the project in my local ide to include all files and update requirements.txt.

Finally, I have a deployed application. Now i am facing an issue with storing data to SQL server when users click a particular button. I am storing the object instead of the value. could use help with this!

We've recently enhanced the product so that when an error occurs at this step, rsconnect will show you the root cause error that took place on our servers. (As @normana discovered, usually it is because when we run pip to recreate your dependencies, it can't find or install some module you have installed locally.)

Very Cool Feature Update! Thanks for sharing

This topic was automatically closed 54 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.