473,395 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

[Newb] Attribute error

Hi folks

There is obviously something that is escaping me - please help!!

I have cut and pasted the relevant portions of text from a script I am
writing in my quest to learn the Python.

Could someone explain the attribution error to me? See the end of the
listing for the error. I have created the Image object(?) as a
wx.StaticBitmap, so whazzamatter.

Thanks for pointers
Steve


class GIP(wx.Frame):
def __init__(self, parent, ID, title):
wx.Frame.__init__(self, parent, ID, title, size = (600, 460))

....

self.Image = wx.StaticBitmap(self, -1, wx.EmptyBitmap(*self.thumbSize),
pos = (160,10)) <<<<<<<<<<<<<<<<<<<<I thunk I dunnit here!

....

def DisplayImg(self, rot):
self.SetStatusText('Current image: ' + self.jpgList[self.curJpg])
img = wx.Image(self.jpgList[self.curJpg], wx.BITMAP_TYPE_JPEG)
if rot == 90:
img = img.Rotate90()
elif rot == 180:
img = img.Rotate(1, (0,0))
elif rot == 270:
img = img.Rotate(1.5, (0,0))
img = self.ScaleImg(img)
img = wx.BitmapFromImage(img)
self.Image.SetBitmap(img) <<<<<<<<<<<<<<<<<<<<<<<Problem
self.txtFName.Clear()
filen = self.GetFName(self.jpgList[self.curJpg])
self.txtFName.WriteText(filen)
self.txtDirName.SetLabel(self.dirName)
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/sm/scriptutils.py", line 49, in run
exec codeObject in mainDict
File "<source>", line 197, in ?
File "/usr/lib/python2.3/site-packages/wxPython/wx.py", line 1951, in __init__
_wxStart(self.OnInit)
File "<source>", line 191, in OnInit
File "<source>", line 78, in __init__
File "<source>", line 116, in DisplayImg
AttributeError: GIP instance has no attribute 'Image'
Jul 18 '05 #1
0 1230

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Knoppix User | last post by:
Hi folks I still have not been able to solve this one, which didn't manage to garner a response yesterday, so I'm rephrasing it here. If I define an attribute in the __init__ statement of a...
1
by: 5tein | last post by:
I mean, with XSL functions such as SELECT can I only refer to XML element values or can I somehow also refer to XML attribute values? Is there any way to refer to XML content based on attribute...
1
by: notbob | last post by:
Newb here! Using 4.0.20 on Slack. Slogging through the official manual. At 2.4.3 Securing the Initial MySQL Accounts, I'm finally stopped cold while trying to follow instructions. Here's what I...
4
by: javascript_noob12 | last post by:
Hi. I am trying to create a CGI script that will use Perl to read a text file to get a list of values, then turn that list into a menu on a website. The menu will be a form with a JavaScript...
11
by: The_Kingpin | last post by:
Hi all, I'm new to C programming and looking for some help. I have a homework project to do and could use every tips, advises, code sample and references I can get. Here's what I need to do....
2
by: Qwert | last post by:
Hello, I use Visual Studio .NET to create a .aspx page. When I do this it creates a ..dll assembly with name similar to the project. I assume that in this dll all kinds of references are made to...
1
by: HateSpam | last post by:
Total newb here. I've built a custom library called ClassLib1. I want to use the 3 classes I've got defined in there in a simple 1-form windows app. I added the reference to the .dll to the...
2
by: python programming newb | last post by:
Hi all, first post. I'm new to python and tkinter. I'm trying to write a program that opens the root window with a button that then opens a toplevel window that then has it's own widgets. I...
15
by: manstey | last post by:
Hi, I have a text file called a.txt: # comments I read it using this:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.