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

[Bug]: Python app deployment in shinyapps.io fails #68

Closed
3 tasks done
vedhav opened this issue Sep 1, 2023 · 1 comment
Closed
3 tasks done

[Bug]: Python app deployment in shinyapps.io fails #68

vedhav opened this issue Sep 1, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@vedhav
Copy link
Contributor

vedhav commented Sep 1, 2023

What happened?

The deployment is successful when done from the local using:

rsconnect::setAccountInfo(
  name = "<ACCOUNT_NAME>",
  token = "<TOKEN>",
  secret = "<SECRET>",
  server = "shinyapps.io"
)
rsconnect::deployApp(
  appFiles = c("app.R", list.files("www", full.names = TRUE)),
  appName = rsconnect::generateAppName("python-test-local"),
  appTitle = "python-test-local",
  account = "<ACCOUNT_NAME>",
  upload = TRUE,
  logLevel = "normal",
  lint = FALSE,
  forceUpdate = TRUE
)

However, the same code is used for deploying in the GitHub deploy action which fails. The RSConnect log is mentioned below

Note: Please checkout the branch deploy-apps@main to have a look at the deploy.yaml

Relevant log output

023-09-01T09:39:14.627579+00:00 shinyapps[9695072]: Container event from container-8569187: start
2023-09-01T09:39:18.415986+00:00 shinyapps[9695072]: Running on host: ce4fd780c0c8
2023-09-01T09:39:18.422397+00:00 shinyapps[9695072]: Running as user: uid=10001(shiny) gid=10001(shiny) groups=10001(shiny)
2023-09-01T09:39:18.428650+00:00 shinyapps[9695072]: Connect version: 2023.03.0
2023-09-01T09:39:18.433746+00:00 shinyapps[9695072]: LANG: C.UTF-8
2023-09-01T09:39:18.440789+00:00 shinyapps[9695072]: Working directory: /srv/connect/apps/nest_python_stable
2023-09-01T09:39:18.445802+00:00 shinyapps[9695072]: Using R 4.3.1
2023-09-01T09:39:18.450892+00:00 shinyapps[9695072]: R.home(): /opt/R/4.3.1/lib/R
2023-09-01T09:39:18.456244+00:00 shinyapps[9695072]: Content will use current R environment
2023-09-01T09:39:18.461473+00:00 shinyapps[9695072]: R_LIBS: (unset)
2023-09-01T09:39:18.467079+00:00 shinyapps[9695072]: .libPaths(): /opt/R/4.3.1/lib/R/library
2023-09-01T09:39:18.472390+00:00 shinyapps[9695072]: shiny version: 1.7.5
2023-09-01T09:39:18.478320+00:00 shinyapps[9695072]: httpuv version: 1.6.11
2023-09-01T09:39:18.484464+00:00 shinyapps[9695072]: rmarkdown version: 2.24
2023-09-01T09:39:18.489911+00:00 shinyapps[9695072]: knitr version: 1.43
2023-09-01T09:39:18.495559+00:00 shinyapps[9695072]: jsonlite version: 1.8.7
2023-09-01T09:39:18.501324+00:00 shinyapps[9695072]: RJSONIO version: (none)
2023-09-01T09:39:18.507956+00:00 shinyapps[9695072]: htmltools version: 0.5.6
2023-09-01T09:39:18.514947+00:00 shinyapps[9695072]: reticulate version: 1.31
2023-09-01T09:39:18.522334+00:00 shinyapps[9695072]: Warning: The reticulate package is installed but no Python environment is available.
2023-09-01T09:39:18.528379+00:00 shinyapps[9695072]: Did you forget to set the RETICULATE_PYTHON environment variable in your .Rprofile before publishing?
2023-09-01T09:39:18.533508+00:00 shinyapps[9695072]: Using pandoc: /opt/connect/ext/pandoc/2.16
2023-09-01T09:39:18.538988+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.544385+00:00 shinyapps[9695072]: Starting R with process ID: '32'
2023-09-01T09:39:18.550523+00:00 shinyapps[9695072]: Shiny application starting ...
2023-09-01T09:39:18.555843+00:00 shinyapps[9695072]: Loading required package: teal.data
2023-09-01T09:39:18.561138+00:00 shinyapps[9695072]: Loading required package: teal.slice
2023-09-01T09:39:18.566331+00:00 shinyapps[9695072]: Loading required package: teal.transform
2023-09-01T09:39:18.573512+00:00 shinyapps[9695072]: Loading required package: magrittr
2023-09-01T09:39:18.579082+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.584999+00:00 shinyapps[9695072]: You are using teal version 0.14.0
2023-09-01T09:39:18.591194+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.596550+00:00 shinyapps[9695072]: Attaching package: ‘teal’
2023-09-01T09:39:18.604790+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.610002+00:00 shinyapps[9695072]: The following objects are masked from ‘package:teal.slice’:
2023-09-01T09:39:18.615671+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.620470+00:00 shinyapps[9695072]:     as.teal_slices, teal_slices
2023-09-01T09:39:18.625931+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.632573+00:00 shinyapps[9695072]: Loading required package: ggmosaic
2023-09-01T09:39:18.637611+00:00 shinyapps[9695072]: Loading required package: ggplot2
2023-09-01T09:39:18.643226+00:00 shinyapps[9695072]: Loading required package: shinyTree
2023-09-01T09:39:18.648942+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.655212+00:00 shinyapps[9695072]: Attaching package: ‘colourpicker’
2023-09-01T09:39:18.660662+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.665910+00:00 shinyapps[9695072]: The following object is masked from ‘package:shiny’:
2023-09-01T09:39:18.671105+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.676338+00:00 shinyapps[9695072]:     runExample
2023-09-01T09:39:18.681435+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.686319+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.691648+00:00 shinyapps[9695072]: Attaching package: ‘ggExtra’
2023-09-01T09:39:18.696985+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.702120+00:00 shinyapps[9695072]: The following object is masked from ‘package:colourpicker’:
2023-09-01T09:39:18.707228+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.712303+00:00 shinyapps[9695072]:     runExample
2023-09-01T09:39:18.717381+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.723015+00:00 shinyapps[9695072]: The following object is masked from ‘package:shiny’:
2023-09-01T09:39:18.728149+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.733273+00:00 shinyapps[9695072]:     runExample
2023-09-01T09:39:18.738473+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.743968+00:00 shinyapps[9695072]: Loading required package: ggpp
2023-09-01T09:39:18.749191+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.755376+00:00 shinyapps[9695072]: Attaching package: ‘ggpp’
2023-09-01T09:39:18.761381+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.766686+00:00 shinyapps[9695072]: The following object is masked from ‘package:ggplot2’:
2023-09-01T09:39:18.774775+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.780148+00:00 shinyapps[9695072]:     annotate
2023-09-01T09:39:18.785409+00:00 shinyapps[9695072]: 
2023-09-01T09:39:18.790574+00:00 shinyapps[9695072]: Registered S3 method overwritten by 'ggpmisc':
2023-09-01T09:39:18.795779+00:00 shinyapps[9695072]:   method                  from   
2023-09-01T09:39:18.800695+00:00 shinyapps[9695072]:   as.character.polynomial polynom
2023-09-01T09:39:18.805899+00:00 shinyapps[9695072]: Error in stop_no_virtualenv_starter() : 
2023-09-01T09:39:18.810815+00:00 shinyapps[9695072]:   Suitable Python installation for creating a venv not found.
2023-09-01T09:39:18.816777+00:00 shinyapps[9695072]: Please install Python with one of following methods:
2023-09-01T09:39:18.821638+00:00 shinyapps[9695072]: - https://github.com/rstudio/python-builds/
2023-09-01T09:39:18.826666+00:00 shinyapps[9695072]: - reticulate::install_python(version = '<version>')
2023-09-01T09:39:18.842294+00:00 shinyapps[9695072]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
2023-09-01T09:39:18.847677+00:00 shinyapps[9695072]: Execution halted

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.
@vedhav vedhav added the bug Something isn't working label Sep 1, 2023
@donyunardi
Copy link
Contributor

Error in stop_no_virtualenv_starter() :

@cicdguy @walkowif
Is this something that you could help out? Maybe something to do with setting up the virtuanenv in the environment/pipeline?

vedhav added a commit that referenced this issue Sep 26, 2023
Closes #69 #68 and #67 

And remove unused assets from the demo apps as we've moved to a remote
logo path

The fix for the cypress tests to work (#67) was to move the JS
dependency lock files inside the `tests` directory instead of the
dedicated `js` directory as it was before.

The deployment failure issues (#68) were caused by a new dependency
added to some package in the `renv.lock` file and once we update the
renv.lock file with the new package dependency it started to work fine.
@vedhav vedhav closed this as completed Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants