If you have any questions, comments or issues with this project please post them here!
So I have typed the code out exactly as it is within the lesson, but there is no text window like there should be. I tested the code outside of Replit just to make sure it wasn’t a bug, but it didn’t work there either. It seems like there is something missing.
Can you please share the code? I may or may not be up to day 66
import tkinter as tk
window = tk.Tk()
window.title(“Groovey Bot”) # Sets the name of the window in the border
window.geometry(“300x300”) # Sets the size of the window in pixels
label = 0
label += 1
hello[‘text’] = label
hello = tk.Label(text = label) # Creates a text box
hello.pack() # ‘pack’ places the element on the screen
button = tk.Button(text = “Don’t Click me!”, command = updateLabel) # Creates a button
text = tk.Text(window, height=1, width=50)
There should be nothing being printed. There are no print statements so its working as intended. @DavidAtReplit can say if this is intentional.
It’s supposed to put a text box that you can type into in the main window.
The next step in the lesson is using information that is typed into that text box.
I’ll grab my original solution repl and take a look
Is this not the code we put in the solution? https://replit.com/@DavidAtReplit/Day-66-Solution-1#main.py
And just to clarify the text box in this is just a label, it’s not meant to be typed into - the buttons are supposed to do the work
Yes, I figured it out. the text.pack was missing the () at the end. I watched the video again and noticed that it was in the video, but not in the tutorial window.
And the issue was before I got to the project, it was on the 2nd slide “Adding Text”
My Output is buffering forever and not showing anything
Does anybody know what the problem might be?
Replit as a whole (more specifically web hosted repls) is having issues right now.
Hi @surfineer and @Firepup650 thanks for your messages. Are you still experiencing problems? If so can you link to your Repl here please?
Hi @IanAtReplit , it’s very flaky.
This week was working fine, but today I’m on the final tkinter project and it’s not running anymore (Output is loading and loading but nothing happens)
Here’s the link to my repl (unfinished!):
main.py - Day 69: Visual Novel - Replit
I do see the first two screens and buttons work on the first screen
I switched to PyCharm and finished my code there and it works
SO I’m gonna close the tkinter chapter now! Woohoo
Thank you for posting that! I had the same issue and couldnt figure out what I did wrong lol. It looks like it was missing for lots of the text.
I got stuck for a while in two places on this lesson:
In the tutorial, the first two code demonstrations in the “Adding Text” section and the first one in “Placing Items” have a text.pack missing the brackets. (Thanks MrKrinle for posting about it)
I also tried to pass variables through my button commands, but this caused the command to run when the program started and do nothing when the button was pressed. I figured out a fix from this.