Skip to content

Deployment worked locally but failed on Google Colab #372

Closed

Description

@hellozeyu

I have a simple app that I can deploy successfully on my local machine using Python 3.9.16, which is the current Python version on Google Colab. However, the same procedure failed on Colab and the error message didn't give me any information. I also noticed that it will create a separate app (my-app-colab vs my-app-colab1) if I ran the deploy code twice. Any thoughts?

Error message from Colab

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

The first one was deployed on my local machine
Screenshot 2023-03-17 at 8 26 52 PM

The simple example app.

from shiny import App, render, ui

app_ui = ui.page_fluid(
    ui.input_numeric("x", "Number input", value=100),
    ui.output_text_verbatim("txt"),
)


def server(input, output, session):
    @output
    @render.text
    def txt():
        return f"x: {input.x()}"


app = App(app_ui, server, debug=True)

Activity

  1. mmarchetti commented on Mar 24, 2023

    @mmarchetti
    Contributor

    It looks like the requirements file sent to the server contained python-apt==2.0.1+ubuntu0.20.4.1 which isn't pip installable. If you create a requirements.txt file in the app directory listing your Python package dependencies, rsconnect-python will use that instead of generating its own with pip freeze.

  2. hellozeyu commented on Mar 24, 2023

    @hellozeyu
    Author

    Thank you! @mmarchetti It solved the problem. Does rsconnect have any verbose argument that can print out the detailed error message for us to debug?

  3. mmarchetti commented on Oct 13, 2023

    @mmarchetti
    Contributor

    Detailed logging was added in #453.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions