-
Notifications
You must be signed in to change notification settings - Fork 506
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-dashboards / voila-vuetify Failed to work with plotly #619
Comments
it is. Did you install the plotly and ipyvuetify libraries in the same environment as voila? This seems like a typical case of the library being installed in the kernel environment but not in the server environment. |
@maartenbreddels PS: Do you have some suggestions of replacement for voila-vuetify? |
No, only a nbextension, but that is served by the server, so all widget libraries also need to be installed at the server environment (a more accurate answer takes a bit longer..). Why would you replace voila-vuetify, I think that template is good as it is? |
Because I can't solve this issue , detail see voila-dashboards/voila-vuetify#36 |
But it's the same issue here right? |
And, did you try without the template, does the default template give the same issues? |
Yes, I just copy here since no one answer me any more .
Everything render correctly except voila-vuetify , no matter with default template or not . |
I think you confused voila-vuetify with jupyter-vuetify (the javascript package behind ipyvuetify). If it doesn't matter what template you use, and it's a problem with jupyter-vuetify, it's an installation issue with jupyter-vuetify. Did you install ipyvuetify in the same environment as voila? |
Yes, I have tried several times in a conda env . |
what does this output give you:
|
|
Want to add my 2 cents that with Voila > 0.2 this doesn't work, but downgrading to Voila 0.1.23 works, and I am not using voila-vuetify or any other such template |
Same here, works in 0.1 but not 0.2, default template. When calling As a work-around, wrapping it in a FigureWidget works fine for me. Quick example to reproduce:
|
It works because by the time cell 2 has executed, the voila notebook script element execution has happened and that pulls in require.min.js. Move all execution to be in cell 1 and I would expect it to fail as before, or move it all into cell 2 and it should work. |
A workaround for now would be to use https://github.com/voila-dashboards/voila-vuetify which includes requirejs earlier. |
Moving the cells around didn't change anything for me with the default template.
Since the vuetify template only shows widgets, |
The figurewidget can be used for that, or use show inside of an Output
widget (see ipywidgets docs)
(from mobile phone)
…On Wed, 21 Oct 2020, 21:23 Jeff, ***@***.***> wrote:
Moving the cells around didn't change anything for me with the default
template.
# cell 1
import plotly.express as px
import plotly.graph_objects as go
fig = px.line(x=[1,2,3], y=[2,4,6])
go.FigureWidget(fig) # still works
# cell 1
import plotly.express as px
import plotly.graph_objects as go
# cell 2
fig = px.line(x=[1,2,3], y=[2,4,6])
fig.show() # still does not work
# cell 3
fig.show() # also does not work, with a second require error in the console
Since the vuetify template only shows widgets, fig.show() wouldn't work
and you'd have to wrap it in a widget regardless, right?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#619 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANPEPKAXA2W5XSZTUFK4LDSL4YJZANCNFSM4NJ5XI4A>
.
|
I'm sorry. In my simple example that I made for #735, it's running pure plotly + voila. For me the go.FigureWidget(fig) still fails in every cell for me because nothing pulls in require.min.js in time without template changes. My own example was obviously oversimplified for this case and too low level. |
Fixed in #735 should be in the next release. |
I shift this issue to here since
voila-vuetify
is not in active maintainment and that repo also beyond to voila .voila-dashboards/voila-vuetify#36
I found it have some problem with plotly , plotly figure can't be ploted , turn on console found a lot of error :
start with voila-vuetify
start without voila-vuetify is fine
plotly figure render fine without
--template vuetify-default
My env:
Other Info
[Voila] Serving static files from /home/xxxx/.conda/envs/py3/lib/python3.7/site-packages/voila/static.
I looked into this folder, only found a file
extension.js
Add option
--VoilaConfiguration.file_whitelist="['.*']"
, 403 change to 404Is this a bug ? How could I walk around it ?
The text was updated successfully, but these errors were encountered: