-1

I am referring to this post: Tkinter not creating a window?. And the code published there as answer returns me the same error on my code: TclError: no display name and no $DISPLAY environment variable This is my code:

import tkinter
root = tkinter.Tk()
root.title = ('Project planner')
open_button = tkinter.Button(root, text='Open project...', command=open_project)
open_button.pack(side='top')
canvas = tkinter.Canvas(root, width=800, height=400, bg='white')
canvas.pack(side='bottom')
tkinter.mainloop()

What is wrong?

wotesi
  • 319
  • 1
  • 3
  • 15

1 Answers1

0

I should be running my code locally, then it works, it does not work on server.

wotesi
  • 319
  • 1
  • 3
  • 15