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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:48:46+00:00 2026-05-26T02:48:46+00:00

I have a Python 2.7/PyGTK 2.24 project. I’m building on Linux Ubuntu 11. I

  • 0

I have a Python 2.7/PyGTK 2.24 project. I’m building on Linux Ubuntu 11.

I am using the following code to animate an image’s movement across the screen.

    def move_fish():
        global fishmove, flipped
        if fishmove < 440 and flipped == False:
            fishmove = fishmove + 10
            fixed_hab.move(fish1, fishmove, 50)
            return True
        elif fishmove == 440 and flipped == False:
            pixbufanim = gtk.gdk.PixbufAnimation("IMG/IMG-FISH-L.gif")
            fish1.set_from_animation(pixbufanim)
            flipped = True
            fishmove = fishmove - 10
            fixed_hab.move(fish1, fishmove, 50)
            return True
        elif fishmove > 0 and flipped == True:
            fishmove = fishmove - 10
            fixed_hab.move(fish1, fishmove, 50)
            return True
        elif fishmove == 0 and flipped == True:
            pixbufanim = gtk.gdk.PixbufAnimation("IMG/IMG-FISH-R.gif")
            fish1.set_from_animation(pixbufanim)
            flipped = False
            return True                

    gobject.timeout_add(100, move_fish)

The code runs fine, with no compile errors or errors during runtime. However, AFTER I close the window, I get the following error multiple times. (Mind you, the fixed_hab (gtk.Fixed) and fish1 (gtk.Image) objects are at the same scope as the function declaration “def move_fish():”

Word4Word-9-16.py:1655: GtkWarning: gtk_fixed_move_internal: assertion
`widget->parent == GTK_WIDGET (fixed)’ failed fixed_hab.move(fish1,
fishmove, 50)

Is this serious? Can I fix it? Is this going to made things difficult for the end user?

Thanks in advance!

  • 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-26T02:48:46+00:00Added an answer on May 26, 2026 at 2:48 am

    Most likely your tiemout_add fires while the application is destroyed.
    Your options are:

    1. Wire a destroy handler and remove the timer before exit.
    2. Topmost inside move_fish, check if the widget is destroyed and return False to end the timer.

    Accessing a widget that no longer exists can fail silently but when your application logic changes, it may even segfault noisily.

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

Sidebar

Related Questions

I'm working on a project using Python and pyGTK. I have a window whose
I have a project in Python 2.7 and PyGTK 2.24. I have the following
I'm creating a indicator applet using Python (pygtk) and I have a function that
I have Python 3.2.2 downloaded and have been using IDLE to execute code; however,
I have a project in Python 2.7 and PyGTK. I need to create a
I have a project built in Python, PyGTK 2.24, and PyGST (GStreamer). I have
I have a project that runs Python 2.7, PyGTK 2.24, and the most recent
I have this code for monitoring a webcam with python and pygtk. The question
If I have Python code class A(): pass class B(): pass class C(A, B):
If I wanted to have Python distributed across multiple processors on multiple computers, what

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.