Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7084255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:16:44+00:00 2026-05-28T07:16:44+00:00

Using Tkinter I have a Toplevel named self.edit_window, a Frame named frame and a

  • 0

Using Tkinter I have a Toplevel named self.edit_window, a Frame named frame and a Canvas named canvas. All I want to do is add the frame to the canvas, which I try to do by using the create_window method:

#make canvas
canvas = Tkinter.Canvas(self.edit_window) 

#make frame and add to canvas
frame = Tkinter.Frame()
canvas.create_window(0,0, anchor = Tkconstants.NW, window = frame, width = 200, height = 200)

And I get the following error on the create_window call:

TclError: can't use .173048428 in a window item of this canvas

And I have no idea what that means. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:16:44+00:00Added an answer on May 28, 2026 at 7:16 am

    The code you supply does not give this error. Are you certain that code is enough to illustrate the problem?

    That being said, the error you say you are getting is consistent with trying to add to a canvas a window that is not a sibling or child of the canvas. According to the official tk documentation:

    The window specified by pathName must either be a child of the canvas
    widget or a child of some ancestor of the canvas widget. PathName may
    not refer to a top-level window.

    If you make your frame a child of the canvas, this problem will go away (though, strictly speaking, it doesn’t have to be an immediate child).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a python based tkinter script which executes some commands using subprocess module.
Is there any way to detect which keys are currently pressed using Tkinter? I
I have written a program in Tkinter (Python 2.7), a scrabblehelper in Norwegian which
I'm using Python Tkinter and I want to place a variable number of text
I have multiple Tkinter listboxes that I have scrolling together using a single scrollbar,
I have just started using Tkinter for a programming class and am having a
So, I'm building a GUI in Python using Tkinter which will be used to,
I have a problem in Python. I'm using Tkinter and have four bind events,
I am using Tkinter in a programming assignment and have the following problem. I
I am using Python and Tkinter. I have an option menu with three choices

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.