473,830 Members | 2,200 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Probable Pywin32 (win32com.clien t) bug??

This is a heads-up on a possible memory corruption type of bug in
recent and present versions of Python/win32com. I dont know if its
general, or specific to using win32com.client to access CDO as my
example does.

My script was tiny - it just opens a MAPI/CDO session and traverses
the email folders - but it keeps crashing Python at random places.

After 2 days of trying everything without success, I've finally
discovered that it depends on how I sequence through a (valid)
collection of folders returned by CDO:

If I do this:

for o in Folders:
....do something with the 'o' object...

Then the script seems to work OK, but it later crashes Python (in
CDO.DLL according to Windows). If it does crash, its always at the
same (unrelated) place in the script, though this changes "randomly"
whenever the script is changed or run in a different environment (eg.
IDE or command line). This suggests to me that there is some kind of
memory corruption going on.

But if I do this:

o = Folders.GetFirs t()
while o:
....do something with the 'o' object...
o = Folders.GetNext ()

Then the whole script works (the same) and is totally robust (no
Python crashes).

Could this be some kind of corruption going on within win32com when
the first technique is used? I've googled around, and as far as I can
see this is perfectly valid code.

Is this group the appropriate place to post this, eg. for Mark H to
see?

I have the whole 50-line script available if anyone else wants to try
this.

My system:
XP SP 1a
Outlook 2003 (with its CDO)
Python 2.3.2 (last ActiveState distribution) or 2.3.4
Pywin32 2.02 for Python 2.3
Jul 18 '05 #1
0 1364

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

Similar topics

1
5200
by: Justin Stockton | last post by:
I recently upgraded from ActivePython 2.2.2 to ActivePython 2.3.2 and I'm running into an issue importing the win32com.client module. Before installing the new version, I made sure to properly remove old version (as well as the mx libraries I had installed). I then installed the new version as a user with the Administrator role. I know I'm technically not supposed to install to a directory with a space in the name, but it worked fine for...
2
6000
by: Michael Jordan | last post by:
I'm hoping that someone here can give me some insight into a problem I'm running into with Python, pywin32 and Excel. All-in-all using Python and pywin32 is great but I've run into a strange problem with the range Offset property, I'm not getting the correct offset and the returned range is a single cell and not the same size as the original range. For example, when I enter the following lines of code in PythonWin : from...
1
1973
by: Philippe C. Martin | last post by:
Hi, I just got the pywin32 "hello world" COM server to install and I did manage to use it from VB 6.0. However, there are some glitches I do not comprehend: 1) at one point I got a python runtime error telling me the "testcomserver" was not found - I got rid of that problem by deleteting the appropriate (I hope) registry and reregistering the server
2
3801
by: agostino.russo | last post by:
I managed to make pywin32 work from a network installation (not really hard work: a shared folder + copying some dlls + setting PYTHONPATH). PythonWin amd COM seem to be working fine from the network install, BUT when I need to pass PyTime to a COM object expecting a Date I get the following error: Python24\Lib\site-packages\win32com\client\dynamic.py", line 251, in _ApplyTypes_ result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags,...
0
1167
by: Do Re Mi chel La Si Do | last post by:
Hi! I had found (since only 2 hours) that KixForm can to do used by Python + PyWin32 At the end of the message, a very small example It's an Active-X, in one file (.DLL), and one help-file (.CHM) It is limited, but simple
2
3723
by: kogrover | last post by:
ISSUE: COM Excel Sort works with Early Binding, but not Late Binding, but py2exe only does Late Binding I have code similar to this (type from notes, so there may be a typo...) import win32com.client xl = win32com.client.Dispatch("Excel.Application") xl.Visible = False xl.ScreenUpdating = False
0
1571
by: Andrea Gavana | last post by:
Hi All, I have a very simple python script that tries to put a rectangular shape in a worksheet and then add some text inside that shape. The main problem, is that as usual Excel doesn't like input strings longer than 200 and something characters. So, by just recording a macro in Excel, I tried to append the text in the shape by dividing it in chunks. For example, I tried this little script: #----------------------------------
0
1014
by: mazerj2006 | last post by:
I'm an old hand at python, but totally new to win32com -- I've run into a snag that seems to be related to python's (usually handy) lack of distinction between floats and doubles. Can anyone explain to me (or point me towards the right docs) how the win32com module handles an ActiveX component that returns or expects an array of SINGLE precision floats (ie, 32-bit floats)? I'm using a vendor-supplied ActiveX component with two related...
1
1909
by: kernel1983 | last post by:
By reading the doc of pywin32 we can invoke COM like: o = win32com.client.Dispatch("Excel.Application") but is it possible to invoke some GUID directly?
0
9793
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9642
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10489
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10525
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9314
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6950
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.