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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:14:13+00:00 2026-06-17T09:14:13+00:00

I am new to Python so bear with me. I use the pyDev plugin

  • 0

I am new to Python so bear with me. I use the pyDev plugin fore eclipse. There are three files:

tool.py:

from gui import Tool_Window
import wx
import settings

if __name__ == '__main__':

    window = wx.App()
    Tool_Window(None, settings.WindowHeader)
    window.MainLoop()

Tool_Window.py:

from Tool import settings
import wx

class Tool_Window(wx.Frame):

def __init__(self, parent, title):

    super(Tool_Window,self).__init__(parent, title = title)

    self.SetDimensions(settings.WindowOpenX,
                       settings.WindowOpenY,
                       settings.WindowWidth,
                       settings.WindowHeight)

settings.py:

WindowHeader = 'The SuperAwesome Tool'
WindowOpenX = 500
WindowOpenY = 100
WindowWidth = 200
WindowHeight = 400

The “tool.py” file is in a package called “Tool”, as is the “settings.py” file, and “Tool_Window” is in the package “gui”.

I am getting error messages from a previous file I had in the project, now renamed to the “settings.py”. I have tried cleaning the project in Eclipse, but nothing happens. The error message looks like:

Traceback (most recent call last):
  File "/home/oystein/workspaces/python/awesome.tool/src/Tool/tool.py", line 8, in <module>
    Tool_Window(None, settings.WindowHeader)
  File "/home/oystein/workspaces/python/awesome.tool/src/gui/__init__.py", line 12, in __init__
    # ;-)
AttributeError: class GeneralParameters has no attribute 'WindowParameters'

Previously I had a class named GeneralParameters with a sub-class WindowParameters, as I wanted to access static variables for settings. I relaized Python couldn’t do it like that and changed it to the “settings.py” file.

I run the program from “tool.py”

Can anyone see what’s wrong here?

  • 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-17T09:14:14+00:00Added an answer on June 17, 2026 at 9:14 am

    You are running stale byte-code, remove the .pyc files and rerun your code.

    The traceback reads the source from the .py file but is built from the bytecode, and the fact that is shows that the error is on a line that only consists of a comment is a hint that things are no longer in sync.

    Normally, Python will clean up the .pyc file when stale, but only if the .py modification time is newer.

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

Sidebar

Related Questions

I'm using Eclipse on Windows, with the PyDev plugin for Python development. When I
New to python, bear with me. I have two text files, each has a
I'm a new Python programmer who is making the leap from 2.6.4 to 3.1.1.
New to Python, have a simple, situational question: Trying to use BeautifulSoup to parse
I am very new to programming and Python so please bear with me. I
Hey all, I'm pretty new to python, so bear with me. I want to
I am trying to fork() and exec() a new python script process from within
I am new in Python so please bear with my naive question. I want
I am very new to python so please bear with me. I have a
I am very new to both Python and regular expressions, so bear with me.

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.