Tkinter error tkinter TclError bad geometry specifier

+1 vote

I am trying to change the size of Tkinter window with the following line

root.geometry('500*500')

but I am getting this error:

_tkinter.TclError: bad geometry specifier "500*500"
May 9, 2019 in Python by Esha
19,624 views
instead of * use x

5 answers to this question.

+3 votes

You have to use the character ‘x’ instead of ‘*’ to indicate multiplication. This should work:

root.geometry('500*500')
answered May 9, 2019 by Tina
Big thank you,
You saved my 30min.
Hey @Rohit Vishwakarma, Thanks for your contribution!

Do upvote the answer in case you found it helpful!!

Cheers!
You are the best
thank you..it worked
Thanks for your help 
thanks
from tkinter import *

root = Tk()

root.title(“calci”)

root.geometry(“361 x 381 + 500 + 200”)

display=Entry(root, bd=29, bg=“blue”, font=(“ariel”, 20))

display.grid(row=0, columnspan=2)

mainloop()
thankyu sir .. you saved my time
Thanks a lot!
+2 votes
Try 265*125 config, because only certain configs work
answered Jul 21, 2019 by anonymous
Thanks. Is it like there are pre-defined sizes to be used?
–1 vote
again it is giving same error while using x
answered Jul 5, 2020 by mayank tyagi

Hi, @Mayank,

Could you please post your error here so that it will be easy for me to investigate further.

+1 vote
you should use x instead of *.

This will work
answered Aug 23, 2020 by Brijal Kansara
Same, It says return self.tk.call('wm', 'geometry', self._w, newGeometry)
_tkinter.TclError: bad geometry specifier "300 x 250"

Hello @Marck,

You might have leave space in "300 x 250". This should be:

root.geometry('300x250')

Also make sure X needs to be lowercased and make sure you import tkinter.

If above doesn't work share your code so that I can identify what is wrong in your code.

Hope it helps!!

Thank You!!

you are grate dude its work properly...Thank You
I am getting the same error while using the geometry of the said dimension.
0 votes
Hey i got solution for this here insted of    * and multipliaction sign we have to use x(i.e alphabate x ) do not use multiplication sign alphabate x is used here
answered Dec 12, 2020 by Swapnil suresh shinde
yes it is working

thank u
it's work. thanks lot.
Thank You!! It worked :)
thank you man ! you give me the best solution
Yes it's working
lower case x should work
thank you so much
thanks brother

Related Questions In Python

0 votes
1 answer

Python error "_tkinter.TclError: unknown font style "Normal""

Change the line  pen.write("score: {} High Score: {}".format(score, ...READ MORE

answered Jul 22, 2019 in Python by Yashita
3,493 views
0 votes
2 answers

Python error "ImportError: No module named 'tkinter'"

sudo apt-get install python3-tk Then, >> import tkinter # ...READ MORE

answered Nov 9, 2019 in Python by Icetutor
• 160 points
24,884 views
0 votes
1 answer

how to solve the error : "ImportError: No module named Tkinter" in python.

Hi@Umama, If you are using Linux system, then ...READ MORE

answered Apr 27, 2020 in Python by MD
• 95,460 points
13,847 views
+1 vote
2 answers

Error:Django gives Bad Request (400) when DEBUG = False

Tried this and it resolved all my ...READ MORE

answered Sep 25, 2020 in Python by Agaba
6,525 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,674 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,461 views
0 votes
2 answers

Tkinter “module not callable” error.

This error statement TypeError: 'module' object is ...READ MORE

answered Jun 27, 2019 in Python by rahul
• 360 points
21,551 views
0 votes
1 answer

Python Tkinter: “‘Label’ unresolved” error

You have imported Tkinter as tk but ...READ MORE

answered May 9, 2019 in Python by Rishi
3,548 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP