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

Widgets do not render in static documentation #3235

Closed
astrojuanlu opened this issue Jul 12, 2021 · 4 comments · Fixed by #3283
Closed

Widgets do not render in static documentation #3235

astrojuanlu opened this issue Jul 12, 2021 · 4 comments · Fixed by #3283
Assignees
Labels
Milestone

Comments

@astrojuanlu
Copy link
Contributor

Problem

I was following the ipywidgets tutorial in preparation of SciPy US 2021 and, when told to go to https://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Events.html to see the differences between link and jslink, saw that no widgets appeared at all. This is both in latest Firefox and Chromium on Linux Mint 20.2.

In both browsers with all extensions disabled I see a process is not defined error. Chromium:

Uncaught (in promise) ReferenceError: process is not defined
    at Object.7482 (embed-amd.js:8)
    at __webpack_require__ (embed-amd.js:14)
    at Object.62207 (embed-amd.js:8)
    at __webpack_require__ (embed-amd.js:14)
    at Object.37552 (embed-amd.js:8)
    at __webpack_require__ (embed-amd.js:14)
    at Object.57850 (embed-amd.js:8)
    at __webpack_require__ (embed-amd.js:14)
    at Object.25741 (embed-amd.js:8)
    at __webpack_require__ (embed-amd.js:14)

Firefox:

Uncaught (in promise) ReferenceError: process is not defined
    7482 https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:8
    __webpack_require__ https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    62207 https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:8
    __webpack_require__ https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    37552 https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:8
    __webpack_require__ https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    57850 https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:8
    __webpack_require__ https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    25741 https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:8
    __webpack_require__ https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    45705 https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:8
    __webpack_require__ https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    93920 https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:8
    __webpack_require__ https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    <anonymous> https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    <anonymous> https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    <anonymous> https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@^0.21.0-alpha.0/dist/embed-amd.js:14
    execCb https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    check https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    enable https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    enable https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    enable https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    bind https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    each https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    enable https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    init https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1
    o https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js:1

However, this seemed to work fine in the 7.6.3 docs, see https://ipywidgets.readthedocs.io/en/7.6.3/examples/Widget%20Events.html.

Suggested Improvement

@astrojuanlu
Copy link
Contributor Author

It looks like 7.6.3 was built with conda on a newer Sphinx version https://readthedocs.org/projects/ipywidgets/builds/12954552/
whereas latest was built with Sphinx 1.8 https://readthedocs.org/projects/ipywidgets/builds/14178439/.

The change was made in #2708 right after 7.6.3 was released, about one year and a half ago. However, that pull request looks fine: https://ipywidgets--2708.org.readthedocs.build/en/2708/examples/Widget%20Events.html

Doing a rough binary search, I think this broke somewhere between #3107 (February, good) and #3167 (March, bad).

@astrojuanlu
Copy link
Contributor Author

I confirm that:

  • The problem is not time-dependent, but code-dependent. In other words: rebuilding the 7.6.3 docs today doesn't exhibit the problem, there are no dependency issues.
  • The problem can be reproduced locally. Therefore, it is not a Read the Docs issue.
  • Doing a git bisect I identified eadb5ef as the first bad commit. No widgets are seen locally.

That's how far I can go with my limited knowledge of ipywidgets.

@jasongrout jasongrout added this to the 8.0 milestone Jul 12, 2021
@jasongrout
Copy link
Member

Thanks for tracking this down! Adding it to the 8.0 milestone.

@martinRenou martinRenou self-assigned this Sep 20, 2021
@martinRenou
Copy link
Member

Assigning myself

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

Successfully merging a pull request may close this issue.

3 participants