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

tkinter.tclerror #62

Closed
shengyuan-tang opened this issue Aug 5, 2021 · 4 comments
Closed

tkinter.tclerror #62

shengyuan-tang opened this issue Aug 5, 2021 · 4 comments

Comments

@shengyuan-tang
Copy link

thanks for your work.
i test demo.py and face this problems:
if i comment out model.show_result, can obtain the result normally.
Traceback (most recent call last):
File "demo.py", line 62, in
main(args)
File "demo.py", line 35, in main
model.show_result(
File "/home/test/anaconda3/envs/pytensorrt/lib/python3.8/site-packages/mmdet/models/detectors/base.py", line 327, in show_result
img = imshow_det_bboxes(
File "/home/test/anaconda3/envs/pytensorrt/lib/python3.8/site-packages/mmdet/core/visualization/image.py", line 113, in imshow_det_bboxes
fig = plt.figure(win_name, frameon=False)
File "/home/test/anaconda3/envs/pytensorrt/lib/python3.8/site-packages/matplotlib/pyplot.py", line 687, in figure
figManager = new_figure_manager(num, figsize=figsize,
File "/home/test/anaconda3/envs/pytensorrt/lib/python3.8/site-packages/matplotlib/pyplot.py", line 315, in new_figure_manager
return _backend_mod.new_figure_manager(*args, **kwargs)
File "/home/test/anaconda3/envs/pytensorrt/lib/python3.8/site-packages/matplotlib/backend_bases.py", line 3494, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "/home/test/anaconda3/envs/pytensorrt/lib/python3.8/site-packages/matplotlib/backends/_backend_tk.py", line 885, in new_figure_manager_given_figure
window = tk.Tk(className="matplotlib")
File "/home/test/anaconda3/envs/pytensorrt/lib/python3.8/tkinter/init.py", line 2261, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: couldn't connect to display "localhost:10.0"

@shengyuan-tang
Copy link
Author

pytensorrt is my virtual environment, which created by conda.

1 similar comment
@shengyuan-tang
Copy link
Author

pytensorrt is my virtual environment, which created by conda.

@whai362
Copy link
Owner

whai362 commented Aug 11, 2021

Hi, my demo.py is based on mmdet.
Your code crash at line https://github.com/open-mmlab/mmdetection/blob/a637a552b0a43285cbcaf4d92eecad36326c8ca0/mmdet/core/visualization/image.py#L113
Maybe your matplotlib is not installed correctly.

@whai362 whai362 closed this as completed Aug 11, 2021
@muyuuuu
Copy link

muyuuuu commented Feb 14, 2022

Maybe your matplotlib is not installed correctly.

I met this problem and matplotlib has been installed correctly.

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

3 participants