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

Error displaying widget for ImageTexture in Textures example with JupyterLab #165

Closed
elPistolero opened this issue Feb 27, 2018 · 7 comments · Fixed by #174
Closed

Error displaying widget for ImageTexture in Textures example with JupyterLab #165

elPistolero opened this issue Feb 27, 2018 · 7 comments · Fixed by #174

Comments

@elPistolero
Copy link

elPistolero commented Feb 27, 2018

The two ImageTexture objects checker_tex and earth_tex cannot be rendered with jupyterlab.
data_tex can be rendered correctly.

With a jupyter notebook everything works as expected.

The console gives the following output:

future.js:155 Uncaught (in promise) Error: Canceled
    at t.dispose (future.js:155)
    at default.js:385
    at Map.forEach (<anonymous>)
    at e.dispose (default.js:384)
    at e.dispose (default.js:244)
    at index.js:241
    at <anonymous>
checkerboard.png Failed to load resource: the server responded with a status of 404 (Not Found)
ImageTexture.js:22 Error loading texture: img/checkerboard.png
bluebird.js:1545 Warning: a promise was rejected with a non-error: [object Event]
    at U (http://localhost:8889/lab/static/main.75a01e1….js:1:109001)
    at A.t._warn (http://localhost:8889/lab/static/main.75a01e1….js:1:103042)
    at A._rejectCallback (http://localhost:8889/lab/static/main.75a01e1….js:1:144410)
    at http://localhost:8889/lab/static/main.75a01e1….js:1:144677
    at http://localhost:8889/lab/static/main.75a01e1….js:1:2017011
    at HTMLImageElement.<anonymous> (http://localhost:8889/lab/static/main.75a01e1….js:1:1368742)
From previous event:
    at A.R [as _captureStackTrace] (http://localhost:8889/lab/static/main.75a01e1….js:1:107952)
    at A._resolveFromExecutor (http://localhost:8889/lab/static/main.75a01e1….js:1:144554)
    at new A (http://localhost:8889/lab/static/main.75a01e1….js:1:137678)
    at i.constructThreeObjectAsync (http://localhost:8889/lab/static/main.75a01e1….js:1:2016837)
    at i.createThreeObjectAsync (http://localhost:8889/lab/static/main.75a01e1….js:1:949721)
    at initialize (http://localhost:8889/lab/static/main.75a01e1….js:1:947950)
    at i.t.Model (http://localhost:8889/lab/static/main.75a01e1….js:1:1900366)
    at i.t [as constructor] (http://localhost:8889/lab/static/main.75a01e1….js:1:2212313)
    at i [as constructor] (http://localhost:8889/lab/static/main.75a01e1….js:1:1918529)
    at i [as constructor] (http://localhost:8889/lab/static/main.75a01e1….js:1:1918529)
    at i [as constructor] (http://localhost:8889/lab/static/main.75a01e1….js:1:1918529)
    at new i (http://localhost:8889/lab/static/main.75a01e1….js:1:1918529)
    at t.<anonymous> (http://localhost:8889/lab/static/main.75a01e1….js:1:2491868)
    at l (http://localhost:8889/lab/static/main.75a01e1….js:1:2487926)
    at Object.next (http://localhost:8889/lab/static/main.75a01e1….js:1:2487257)
    at a (http://localhost:8889/lab/static/main.75a01e1….js:1:2486784)
    at <anonymous>
@vidartf
Copy link
Member

vidartf commented Feb 28, 2018

Thanks for the report. I'm looking into it, but got side tracked by something else. Which version of jupyterlab and which version of pythreejs are you using?

@elPistolero
Copy link
Author

I'm using jupyterlab version 0.31.8 and pythreejs version 1.0.0b6.

I also tried using absolute paths for the png files but that didn't fix the issue.

@vidartf
Copy link
Member

vidartf commented Mar 8, 2018

Good find! I need to make it a routine to also check all the examples in lab. This best solution to this follows jupyter-widgets/ipywidgets#1993.

@elPistolero
Copy link
Author

Interesting.
Do you know why absolute paths don't work? Or are relative paths always assumed?

@vidartf
Copy link
Member

vidartf commented Mar 19, 2018

Do you know why absolute paths don't work?

The texture is supposed to be a URL, so you might have success with an absolute URL.

@elPistolero
Copy link
Author

The problem with not displaying absolute URLs seems to be a browser security related issue.

@vidartf
Copy link
Member

vidartf commented Apr 25, 2018

This is now fixed in master, and will be available with the next release (requires latest version of ipywidgets lab extension).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants