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 8160663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:19:17+00:00 2026-06-06T18:19:17+00:00

I was trying to add a progress bar to my Tkinter gui, and I

  • 0

I was trying to add a progress bar to my Tkinter gui, and I have been stymied by a problem that I am not 100% sure how to define. My program is setup in this fassion.

class MAIN(object):
    def __init__(self, *args, **kwargs)
        tkinter stuff...

root = tk.Tk()
app = MAIN(root)
app.mainloop()

And then I tried to add a progress using this example (that works on its own). And this code is set up like this.

class MAIN(tk.Tk):
    def __init__(self, *args, **kwargs)
        tk.Tk.__init(self, *args, **kwargs)
        tkinter stuff....

app = MAIN()
app.mainloop()

If I change either of these programs to have the other’s format they throw errors. I would ideally like to be able to keep my format (the first one) and be able to run the example in my format, so that way I don’t have to update a lot of legacy code.

Help/explanations will be greatly appreciated.

Edit: Here is the error.

TypeError: unbound method __init__() must be called with Tk instance as first argument (got SampleApp instance instead)
  • 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-06-06T18:19:20+00:00Added an answer on June 6, 2026 at 6:19 pm

    My issue was that I did not understand inheritance in classes, and where as my program prior to trying to use the progress bar did not need any modifications to the tk.Tk.__init__. So the resolution to the issue was to replace the class MAIN(object): with class MAIN(tk.Tk): as in the working example. My progress bar still does not work right and now there is another window, but the program runs.

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

Sidebar

Related Questions

I am trying to add a progress/loading bar to my application that uses WebView
The basic problem I'm trying to solve is that I have a mix of
I am a PHP newbie and trying to add a progress-bar to an existing
I am trying to add a jquery progress bar inside a ul li tag.
I need to add a progress bar to my application, but I'm trying to
Recently I've been trying to restructure an old database that was not designed with
I am trying to add some text to a Tool Strip Progress Bar but
I am trying to add ListView items one by one. So if I have
Im setting up a progress bar as follows : void CProgressBar::add(int ammount) { mProgress
QC#101189 I'm trying to custom draw a progress bar in a Delphi TListView as

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.