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

win32con.client.constants error

I am working on a Outlook COM project. For some reason
win32com.client.constants

quit working between runs of one of my test scripts. It's supposed to
acquire attributes for all constants defined in loaded COM servers
through its __dicts__ attribute,and did for awhile

Now it is throwing an AttributeError:

PythonWin 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)]
on win32.

Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin'
for further copyright information.

Traceback (most recent call last):

File
"C:\Python24\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py" ,
line 310, in RunScript

exec codeObject in __main__.__dict__

File "C:\Documents and
Settings\bnewberg\Desktop\mail_script\mail_move_in it_test.py", line 22,
in ?

msgFolderTypeConsts = {'Rcvd': constants.olFolderInbox, 'Sent':
constants.olFolderSentMail}

File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line
168, in __getattr__

raise AttributeError, a

AttributeError: olFolderInbox

Code snippet:
from win32com.client import gencache, constan

[SNIP]

class MSOutlook(object):

def __init__(self):

try:

self.oOutlookApp =
gencache.EnsureDispatch("Outlook.Application")

self.outlookFound = True

except:

print "MSOutlook: unable to load Outlook"

self.outlookFound = False

if not self.outlookFound: return

[SNIP]

# Outlook default folder constants

msgFolderTypeConsts = {'Rcvd': constants.olFolderInbox, 'Sent':
constants.olFolderSentMail}

folderSet = [yr, mo, msgType] # Used to loop over folder tree.

I am running Python 2.4.4 and pywin32-210. I tried reinstalling pywin
without success.

Thanks,

Barry Newberger
Apr 2 '07 #1
0 1264

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

Similar topics

2
by: WIWA | last post by:
Hi, I want to make a UDP client server application that is conform to RFC868 (Time protocol). Both the UDP client and UDP server are in a test phase. The question is: when I add ...
1
by: NGETI | last post by:
I have installed Python and it appears to work. Trying it out on some scripts gives me the error, "cannot find win32con" Can anyone suggest where I can get this file? I am running Windows 2000.
4
by: jsnX | last post by:
Say I would like my namespace to have some constants associated with it, like this: ========== ===== namespace broadpen { struct defaults { static const double w = 10.0; static const double...
5
by: Matthew Hood | last post by:
Here's a interesting question for the guru's out there. I've created a VB.NET class library with a couple of forms that I have successfully got to work from within MS Access using COM interop and...
5
by: kbperry | last post by:
On my machine, this runs fine, but when I try to run it on someone elses machine it blows up with an attribute error: <code> import win32com.client, pythoncom ...
8
by: Brian C | last post by:
Hello all, I have a quick question coming from a long time C programmer, trying to get back into C++. What I want to do is something like (C version): int OpenLog(char *Filename) { FILE...
1
by: getelectronic | last post by:
Hi all I have a sample code to implement opc client in Python. i use a file .py making by makepy with pythonwin for Com Interface. i can get all server in machine, connect to server opc,...
11
by: Bill Davy | last post by:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which...
54
by: shuisheng | last post by:
Dear All, I am always confused in using constants in multiple files. For global constants, I got some clues from http://msdn.microsoft.com/en-us/library/0d45ty2d(VS.80).aspx So in header...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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...
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
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,...

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.