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

Voila Error with pm2 on Ubuntu 22.04 #1409

Open
christianp8 opened this issue Oct 25, 2023 · 2 comments
Open

Voila Error with pm2 on Ubuntu 22.04 #1409

christianp8 opened this issue Oct 25, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@christianp8
Copy link

hello i need help i want to deploy Voila, to fix this error using pm2 on Ubuntu 22.04

0|AnalyticEngine | /var/www/html/Voila_Home/AnalyticEngine.ipynb:2
0|AnalyticEngine | "cells": [
0|AnalyticEngine | ^
0|AnalyticEngine | SyntaxError: Unexpected token :
0|AnalyticEngine | at createScript (vm.js:80:10)
0|AnalyticEngine | at Object.runInThisContext (vm.js:139:10)
0|AnalyticEngine | at Module._compile (module.js:616:28)
0|AnalyticEngine | at Object.Module._extensions..js (module.js:663:10)
0|AnalyticEngine | at Module.load (module.js:565:32)
0|AnalyticEngine | at tryModuleLoad (module.js:505:12)
0|AnalyticEngine | at Function.Module._load (module.js:497:3)
0|AnalyticEngine | at Object. (/usr/local/lib/node_modules/pm2/lib/ProcessContainerForkLegacy.js:28:21)
0|AnalyticEngine | at Module._compile (module.js:652:30)
0|AnalyticEngine | at Object.Module._extensions..js (module.js:663:10)

voila.json:
{
"VoilaConfiguration": {
# Activate or deactivate preheat kernel option.
"preheat_kernel": true
},
"VoilaKernelManager": {
# A list of notebook name or regex patterns to exclude notebooks from using preheat kernel.
"preheat_denylist": [
],
# Setting for AnalyticEngine.ipynb notebook
"AnalyticEngine.ipynb": {
"pool_size": 5, # Size of pool
},
},
# Delay time in second before filling the kernel pool.
"fill_delay": 0
}
}

pm2 with ecosystem.config.js:
module.exports = {
apps: [
{
name: "voila-app-Home",
script: "/opt/miniconda/envs/project3/bin/voila",
args: ["--preheat_kernel=True", "--pool_size=5", "--no-browser", "/var/www/html/Voila_Home/AnalyticEngine.ipynb", "--template", "vuetify-default","--Voila.base_url=/Voila/"],
interpreter: "/opt/miniconda/envs/project3/bin/python",
autorestart: true,
watch: true,
max_memory_restart: "1G",
instances: 1,
env: {
Voila_config_file_whitelist: "/var/www/html/Voila_Home/"
}
},
],
};

thanks

@christianp8 christianp8 added the bug Something isn't working label Oct 25, 2023
@ggogate
Copy link

ggogate commented Oct 25, 2023

Probably issue with the ipynb itself?
0|AnalyticEngine | "cells": [
0|AnalyticEngine | ^
0|AnalyticEngine | SyntaxError: Unexpected token :

  1. Can you create a new simple notebook and see if it works?
  2. Open the /var/www/html/Voila_Home/AnalyticEngine.ipynb notebook using text editor and check if there's an issue with the Json?
  3. Check if you can deploy without the vuetify template to see if the issue maybe with the template?

@trungleduc
Copy link
Member

trungleduc commented Oct 25, 2023

The js error stack is coming from pm2 and not voila.

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

3 participants