Python Forum
[Tkinter] Cloud server running(Can be edited directly online)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Cloud server running(Can be edited directly online)
#1
Lightbulb 
Error:
TclError Traceback (most recent call last) <ipython-input-2-59f0c474d547> in <module>() 3 import tkinter,qrcode,time 4 import tkinter.messagebox ----> 5 window = tkinter.Tk() 6 window.title('二维码生成器') 7 window.geometry('500x200') /usr/lib/python3.6/tkinter/__init__.py in __init__(self, screenName, baseName, className, useTk, sync, use) 2021 baseName = baseName + ext 2022 interactive = 0 -> 2023 self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) 2024 if useTk: 2025 self._loadtk() TclError: no display name and no $DISPLAY environment variable
YES!IT'S me.
The child that coding aagly(?).
this link
Can be edited directly online:
https://colab.research.google.com/drive/...sp=sharing
THANKS!!!
(PLESE DON'T SAYS ME:agly?)

P.S.:(important)
running on pycharm ,the code is fine.
but on the cloud server is wrong.
buran write Jan-29-2021, 06:50 AM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Reply
#2
For all practical purposes you cannot have Tkinter GUI running on Colab.
You can emulate display but you will not be able to interact with it.

See
https://stackoverflow.com/q/61168210/4046632
https://stackoverflow.com/q/49478228/4046632


On a general note - Please, don't ask/offer people to edit your code directly online. You should post enough information (minimal reproducible example) - code (in python tags), traceback (in error tags), input/output data, etc. so that people on the forum can reproduce the problem and answer.
I strongly advise you to visit the help center
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyQt] Cloud app development league55 1 2,249 Apr-05-2018, 07:55 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020