problem about using matplotlib in django

34 views
Skip to first unread message

Ahmet Temiz

unread,
Sep 19, 2017, 6:52:35 AM9/19/17
to Django users

Hi,

In django I tried to use matplotlib and 
I run into this exception

...
  icon_img = Tk.PhotoImage(file=icon_fname)
  File "/usr/lib/python3.5/tkinter/__init__.py", line 3397, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/usr/lib/python3.5/tkinter/__init__.py", line 3353, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
RuntimeError: main thread is not in main loop

How can I solve it?
regards
Reply all
Reply to author
Forward
0 new messages