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

TclError: no display name and no $DISPLAY environment variable #210

Open
JBoggsy opened this issue Nov 8, 2018 · 0 comments
Open

TclError: no display name and no $DISPLAY environment variable #210

JBoggsy opened this issue Nov 8, 2018 · 0 comments

Comments

@JBoggsy
Copy link

JBoggsy commented Nov 8, 2018

While trying to run the vision tutorial codes, I encountered the following error with every .py file in the 03_vision folder:

Traceback (most recent call last):
  File "03_vision/02_face_follower.py", line 60, in <module>
    cozmo.run_program(follow_faces, use_viewer=True, force_viewer_on_top=True)
  File "/mnt/e/coding/venvs/soar/lib/python3.5/site-packages/cozmo/run.py", line 847, in run_program
    force_on_top=force_viewer_on_top)
  File "/mnt/e/coding/venvs/soar/lib/python3.5/site-packages/cozmo/run.py", line 716, in connect_with_tkviewer
    viewer = tkview.TkImageViewer(force_on_top=force_on_top)
  File "/mnt/e/coding/venvs/soar/lib/python3.5/site-packages/cozmo/tkview.py", line 80, in __init__
    tk_root = tkinter.Tk()
  File "/usr/lib/python3.5/tkinter/__init__.py", line 1871, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

It's obviously caused by the programs trying to display the camera readout through Tkinter, since if I set the use_viewer parameter to False in the cozmo.run_program() call the error disappears and the code works as expected. Googling gave me lots of results for matplotlib issues with this error, which are apparently solved by setting the graphics backend to "agg", but I'm not sure how to do that with the Cozmo SDK, Any insight would be appreciated.

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