Comments (5)
So, a deeper issue is the transparency of JS errors from Python side. This should cause a timeout exception on Python side so that the user knows what is happening.
from ipyniivue.
Let me wrap this also in this issue to avoid creating another issue just for that: The run_custom_code
also seems to fail to return values. Printing is_pial
in this example currently gives me None
. With fixing this, we should add a test for pytest that avoids code regression on that. This is a fairly simple test to add.
from ipyniivue.
Thank you for bringing this up. run_custom_code
does not work online Jupyter environments, such as Google Colab, due to the way online Jupyter handles concurrent execution. See Kirill888/jupyter-ui-poll#23 (comment) for more info.
Concerning ipyniivue, we can either add note to the documentation specifying that run_custom_code
(and therefore all getters that use run_custom_code
) do not work in online Jupyter environments.
Alternatively, we could explore implementing some solution that runs in online Jupyter environments. Currently, I don't know of any ways to do this.
from ipyniivue.
What is the difference between local and "online" Jupyter environments exactly? The issue you referred to seems to make a difference between ipykernel
(works) and jupyterlite
(does not work). I may be mistaken but I did not see any clear restrictions (except in the version maybe) for ipykernel
on the Colab...? Also, jupyter-ui-poll
seems to work on Colab (Kirill888/jupyter-ui-poll#18). It seems like there was some issues with ipykernel
4.x, which was the default for Colab at the time the ticket was created, but the current version is now 5.5.6.
from ipyniivue.
I see, I think I was confused with JupyterLite and Google Colab, and just assumed they used the same kernel. I'll have to do more testing to see if I can get run_custom_code to work in Colab then.
The reason it takes at most 60 seconds to run the run_custom_code function is because it times out at 60 seconds.
from ipyniivue.
Related Issues (20)
- a
- Graph features
- Add custom colormaps
- devDependency requirement on @jupyterlab/builder@^4.0.0
- load_meshes HOT 1
- Building documentation HOT 8
- Review code of NiiVue Jupyter notebook integration in IPyNiiVue HOT 4
- load_meshes does not add the mesh to self.meshes in MacOS and Linux HOT 5
- Restarting the kernel fails to destroy the NiiVue object
- jupyterlab 4 support HOT 4
- ENH: Integration with MNE-Python
- Possible to add overlays and/or possibly saving the whole scene as .html file to harddrive?
- Prototype of ipyniivue using anywidget HOT 7
- Project admin, milestones, and roadmap
- Priorities HOT 6
- ☂️ Volume HOT 9
- Better camel/snake scale conversion HOT 10
- Exposing `nv.saveScene` on the python side HOT 1
- Deleting big files HOT 2
- Larger NIfTI images cause Jupyter Notebook to crash
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ipyniivue.