I was trying to learn to create a new window using this code:
from tkinter import *
window = Tk()
window.mainloop()
But I run into this error,
ValueError: source code string cannot contain null bytes
Can someone help me with this?
I was trying to learn to create a new window using this code:
from tkinter import *
window = Tk()
window.mainloop()
But I run into this error,
ValueError: source code string cannot contain null bytes
Can someone help me with this?
The code is absolutely fine and a tkinter window should pop up. A problem has emerged within your editor. Don't know if my answer helps much, but the code is fine and the editor is the problem.
Another thread where this problem is discussed: Python: source code string cannot contain null bytes