473,387 Members | 1,529 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,387 software developers and data experts.

Attribute error

Hi all,

What is attribute error? what causes that error, especially with COM
objects?

To be precise :

Attribute Error: LCAS.LabcarController.writeLogWindow()

Here, LCAS.... is a COM object

Thanks
Teja.P

Oct 14 '06 #1
3 1540
"Teja" <te*********@gmail.comwrites:
What is attribute error?
exception AttributeError
Raised when an attribute reference or assignment fails.

<URL:http://docs.python.org/lib/module-exceptions.html#l2h-103>
To be precise :
Not precise enough, unfortunately. Please construct a minimal,
complete example that demonstrates the behaviour (and does nothing
except what's needed to demonstrate the behaviour), and post its code
along with a traceback output.

--
\ "He who allows oppression, shares the crime." -- Erasmus |
`\ Darwin, grandfather of Charles Darwin |
_o__) |
Ben Finney

Oct 14 '06 #2
"Teja" <te*********@gmail.comwrote:
Hi all,

What is attribute error? what causes that error, especially with COM
objects?

To be precise :

Attribute Error: LCAS.LabcarController.writeLogWindow()

Here, LCAS.... is a COM object

Thanks
Teja.P
LabcarController might be a function. See:

http://groups.google.com/group/comp....341f1aedcae6d3

for more detail.

hope this helps,
max

Oct 14 '06 #3

Max Erickson wrote:
"Teja" <te*********@gmail.comwrote:
Hi all,

What is attribute error? what causes that error, especially with COM
objects?

To be precise :

Attribute Error: LCAS.LabcarController.writeLogWindow()

Here, LCAS.... is a COM object

Thanks
Teja.P

LabcarController might be a function. See:

http://groups.google.com/group/comp....341f1aedcae6d3

for more detail.

hope this helps,
max

HI all,

I have a problem in accesing COM objects in threads. To be precise,
lets assume that I have a class GenericFunctions which is defined as
follows:

import win32com.client, pythoncom, thread
ie=win32com.client.Dispatch('internetexplorer.appl ication')
ie.Visible=1

class GenericFunctions:

def __init__(self):
print "In Constructor of Generic Functions"

def MyNavigate(self,dest):
ie.Navigate(dest)
Now there is another file Main.py which is defined as follows:

import win32com.client, pythoncom, thread
from GenericFunctions import *
obj = GenericFunctions()

class Mainclass:
def __init__(self);
print "In Constructor of Main class"

def threadFunction(self,dest):
pythoncom.CoInitialize()
d=pythoncom.CoGetInterfaceAndReleaseStream(s,
pythoncom.IID_IDispatch)
my_ie=win32com.client.Dispatch(d)
obj.func(dest) # this is gving an error.
pythoncom.CoUninitialize()

if __name__ == "__main__":

s=pythoncom.CoMarshalInterThreadInterfaceInStream( pythoncom.IID_IDispatch,ie)
thread.start_new_thread(self.nav, (s,'www.google.com')

Basically, I want to access object of GenericFunctions class inside
threadFunction(). However I was able to execute
my_ie.Navigate("google.com"). But that was not I wanted. I am not
knowing where the error is....
Please let me know the solution ASAP...

Teja.P

Oct 16 '06 #4

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

Similar topics

2
by: bjam | last post by:
Hi, I am hoping someone can answer the following question it seems when I put in an & in the query string to be translated as the link in the XML to HTML I get an error, just using the ? mark is...
4
by: Manuel Faux | last post by:
Hello! I used the "File Upload - Validator" and the result is like the following: Line 13, column 204: there is no attribute "border" ....irefox!" title="Get Firefox!" border="0" /></a></p>...
2
by: Keith Chadwick | last post by:
Is there a way to append to an attribute in XSLT. For example: <input name="emailaddress" style="width:200px"> <xsl:apply-templates select="//object"/> </input> <xsl:template...
2
by: Ian Griffiths | last post by:
I have been given a schema, instances of which I'm required to be able to consume and generate. I'd like to be able to manipulate these instances as DataSets internally in my application. The...
0
by: Doug Bailey | last post by:
I am trying to create a coclass attribute for an outproc COM server (i.e. an EXE). The project was created using the ATL Project wizard using .NET2003. The coclass is defined as follows: ...
3
by: Peter Seif | last post by:
I have a PC that has windows 2000 Server ,Microsoft .Net Framework 1.0 installed First time I tried to create a web application and debug it i had the error "unable to debub ..." so i changed the...
10
by: Jon Noring | last post by:
Out of curiosity, may a CDATA section appear within an attribute value with datatype CDATA? And if so, how about other attribute value datatypes which accept the XML markup characters? To me,...
3
by: Andy | last post by:
Hello Guys: What am I doing wrong with this code? I can't seem to get it to simply add an attribute to my node. The node already exists. I am simply opening the XMLDocument and creating one...
0
by: Aray | last post by:
Let us see the test file following: -------file nowork.xsd begin----------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"...
2
by: BiraRai | last post by:
def getAttributeForProperty(self,rollnumber,attribute): # attribute have the value _ward ''' If year is null then use current year. Returns the value of the attribute for the given roll number...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.