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

visualization seems to conflict with jupyter notebooks #13

Open
zierenberg opened this issue Apr 7, 2021 · 0 comments
Open

visualization seems to conflict with jupyter notebooks #13

zierenberg opened this issue Apr 7, 2021 · 0 comments

Comments

@zierenberg
Copy link

zierenberg commented Apr 7, 2021

The internal visualization uses pyglet and I believe that this does not work together with jupyter notebooks. Here is what I get when I include the visualization:

>>> from epipack.vis import visualize
---------------------------------------------------------------------------

NoSuchDisplayException                    Traceback (most recent call last)

<ipython-input-1-9183d34eb421> in <module>
      1 import epipack as epk
----> 2 from epipack.vis import visualize
      3 import netwulf as nw

6 frames

/usr/local/lib/python3.7/dist-packages/pyglet/canvas/xlib.py in __init__(self, name, x_screen)
    121         self._display = xlib.XOpenDisplay(name)
    122         if not self._display:
--> 123             raise NoSuchDisplayException('Cannot connect to "%s"' % name)
    124 
    125         screen_count = xlib.XScreenCount(self._display)

NoSuchDisplayException: Cannot connect to "None"

I have no knowledge of pyglet but a short internet search suggests that jupylet might be a suitable workaround in case one can assess whether the code is run in a shell or a notebook.

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

No branches or pull requests

1 participant