AttributeError:"InserData object has no attribute"weather2"

AttributeError:"InserData object has no attribute"weather2"
 I'm getting error and I dont know why ... it's been some time since I worked with Python ... any ideas why Im gettine this error ...

self.nameofevet1=''
self.populateVenue(self)
self.weather2 = wx.Choice(self.panel, wx.ID_ANY, choices = self.nameofevet1, name='ShowList')


 def populateVenue(self,event):
	conn = lite.connect("xxxxxxx")
        c = conn.cursor()
        c.execute('select * from showlist')
	rows=c.fetchall()
            #print rows
	rRows=[]
	for row in rows:
                s={}
                s['Venue_name']  =row[1] 
		self.nameofevet1 = s['Venue_name']
		print self.nameofevet1
	self.weather2.Clear()
	self.weather2.AppendItems(self.nameofevet1)

Open in new window

dolamitejenkinsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

clockwatcherCommented:
It might help if you gave us a full stack trace and the entire code (or at least the entire class that populateVenue is a method of -- and hopefully that class is InserData) because your first three lines don't have any real context.

Assuming the error is happening on line 18 of your post (and that populateVenue is a class method), the error indicates that your InserData object doesn't have the weather2 attribute defined at the point your program is hitting line 17.

E.g.,

>>> class InserData():
...     pass
...
>>> a = InserData()
>>> a.weather2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: InserData instance has no attribute 'weather2'

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dolamitejenkinsAuthor Commented:
thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.