473,686 Members | 2,162 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

COM makepy broken in ActivePython 2.3.2?

I have problems getting "COM makepy" working in ActivePython 2.3.2.
This is what happens when I start "COM makepy" from the Pythonwin
Menu:

PythonWin 2.3.2 (#49, Nov 6 2003, 10:18:20) [MSC v.1200 32 bit
(Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mh******@skipp inet.com.au)
- see 'Help/About PythonWin' for further copyright information.
Failed to execute command:

from win32com.client import makepy;makepy.m ain()
Traceback (most recent call last):
File
"C:\Python23\Li b\site-packages\Python win\pywin\frame work\toolmenu.p y",
line 103, in HandleToolComma nd
exec "%s\n" % pyCmd
File "<string>", line 1, in ?
File "C:\Python23\Li b\site-packages\win32c om\client\__ini t__.py",
line 12, in ?
import dynamic, gencache, pythoncom
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 623, in ?
__init__()
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 52, in __init__
Rebuild()
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 610, in Rebuild
_SaveDicts()
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 57, in _SaveDicts
raise RuntimeError, "Trying to write to a readonly gencache
('%s')!" \
RuntimeError: Trying to write to a readonly gencache
('C:\TEMP\gen_p y\2.3')!
---------------------------------------------------

OK, so I figure it wants to write to C:\TEMP\gen_py (why? IIRC this
used to be buried somewhere along the site-packages). I create the
directory & import a class. This is what happens:

Generating to
C:\TEMP\gen_py\ 2.3\08EF934A-521D-4E29-A92F-0FDE92DDE9D6x0x 1x0.py
Failed to execute command:
from win32com.client import makepy;makepy.m ain()
Traceback (most recent call last):
File
"C:\Python23\Li b\site-packages\Python win\pywin\frame work\toolmenu.p y",
line 103, in HandleToolComma nd
exec "%s\n" % pyCmd
File "<string>", line 1, in ?
File "C:\Python23\Li b\site-packages\win32c om\client\makep y.py", line
362, in main
GenerateFromTyp eLibSpec(arg, f, verboseLevel = verboseLevel,
bForDemand = bForDemand, bBuildHidden = hiddenSpec)
File "C:\Python23\Li b\site-packages\win32c om\client\makep y.py", line
273, in GenerateFromTyp eLibSpec
gencache.AddMod uleToCache(info .clsid, info.lcid, info.major,
info.minor)
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 514, in AddModuleToCach e
mod = _GetModule(fnam e)
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 590, in _GetModule
mod = __import__(mod_ name)
File
"C:\TEMP\gen_py \2.3\08EF934A-521D-4E29-A92F-0FDE92DDE9D6x0x 1x0.py",
line 12, in ?
from win32com.client import Dispatch
ImportError: cannot import name Dispatch
---------------------------------------------------

Now when I try this:

import win32com.client
instance = win32com.client .Dispatch("..." )

it tells me that Dispatch is not found ???? I restart pythonwin &
python2.3.2 & win32all "out of the box" before and didn't have any of
these problems. So, is "COM makepy" broken in AP232?
Jul 18 '05 #1
3 2688
Gerson Kurz wrote:
I have problems getting "COM makepy" working in ActivePython 2.3.2.
This is what happens when I start "COM makepy" from the Pythonwin
Menu:

PythonWin 2.3.2 (#49, Nov 6 2003, 10:18:20) [MSC v.1200 32 bit
(Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mh******@skipp inet.com.au)
- see 'Help/About PythonWin' for further copyright information.
Failed to execute command:


from win32com.client import makepy;makepy.m ain()
Traceback (most recent call last):
File
"C:\Python23\Li b\site-packages\Python win\pywin\frame work\toolmenu.p y",
line 103, in HandleToolComma nd
exec "%s\n" % pyCmd
File "<string>", line 1, in ?
File "C:\Python23\Li b\site-packages\win32c om\client\__ini t__.py",
line 12, in ?
import dynamic, gencache, pythoncom
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 623, in ?
__init__()
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 52, in __init__
Rebuild()
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 610, in Rebuild
_SaveDicts()
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 57, in _SaveDicts
raise RuntimeError, "Trying to write to a readonly gencache
('%s')!" \
RuntimeError: Trying to write to a readonly gencache
('C:\TEMP\gen_p y\2.3')!
---------------------------------------------------

OK, so I figure it wants to write to C:\TEMP\gen_py (why? IIRC this
used to be buried somewhere along the site-packages). I create the
directory & import a class. This is what happens:

Generating to
C:\TEMP\gen_py\ 2.3\08EF934A-521D-4E29-A92F-0FDE92DDE9D6x0x 1x0.py
Failed to execute command:
from win32com.client import makepy;makepy.m ain()
Traceback (most recent call last):
File
"C:\Python23\Li b\site-packages\Python win\pywin\frame work\toolmenu.p y",
line 103, in HandleToolComma nd
exec "%s\n" % pyCmd
File "<string>", line 1, in ?
File "C:\Python23\Li b\site-packages\win32c om\client\makep y.py", line
362, in main
GenerateFromTyp eLibSpec(arg, f, verboseLevel = verboseLevel,
bForDemand = bForDemand, bBuildHidden = hiddenSpec)
File "C:\Python23\Li b\site-packages\win32c om\client\makep y.py", line
273, in GenerateFromTyp eLibSpec
gencache.AddMod uleToCache(info .clsid, info.lcid, info.major,
info.minor)
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 514, in AddModuleToCach e
mod = _GetModule(fnam e)
File "C:\Python23\Li b\site-packages\win32c om\client\genca che.py",
line 590, in _GetModule
mod = __import__(mod_ name)
File
"C:\TEMP\gen_py \2.3\08EF934A-521D-4E29-A92F-0FDE92DDE9D6x0x 1x0.py",
line 12, in ?
from win32com.client import Dispatch
ImportError: cannot import name Dispatch
---------------------------------------------------

Now when I try this:

import win32com.client
instance = win32com.client .Dispatch("..." )

it tells me that Dispatch is not found ???? I restart pythonwin &
python2.3.2 & win32all "out of the box" before and didn't have any of
these problems. So, is "COM makepy" broken in AP232?


Try creating a "gen_py" directory under the installed win32com
directory. The directory need only exist, not contain anything. This
should make it start working. I'm not sure if the recent APy update
fixed that...

Mark.

Jul 18 '05 #2
On Sat, 22 Nov 2003 11:28:13 +1100, Mark Hammond
<mh******@skipp inet.com.au> wrote:
Try creating a "gen_py" directory under the installed win32com
directory. The directory need only exist, not contain anything. This
should make it start working. I'm not sure if the recent APy update
fixed that...


You are right, this fixes both problems. So maybe the installer does
not correctly create the directory? Anyway, many thanks!

Jul 18 '05 #3
[Gerson Kurz wrote]
On Sat, 22 Nov 2003 11:28:13 +1100, Mark Hammond
<mh******@skipp inet.com.au> wrote:
Try creating a "gen_py" directory under the installed win32com
directory. The directory need only exist, not contain anything. This
should make it start working. I'm not sure if the recent APy update
fixed that...


You are right, this fixes both problems. So maybe the installer does
not correctly create the directory? Anyway, many thanks!


Yes, ActivePython 2.3.2 build 231 for Windows had this bug. A new build
was recently released (build 232) that fixed this issue.

Trent

--
Trent Mick
Tr****@ActiveSt ate.com

Jul 18 '05 #4

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

Similar topics

0
543
by: bk | last post by:
hi, i'm using pythonwin 2.2.3 my programm reads and write the outlook-adress book using COM. for this i have to use the makepy utility. after i have run the utiltity everything is fine and i can run my py-file without any errors. but if i close the pythonwin and restart and then try to run my py-script i get the following error: File "C:\Program Files\Python22\contacts_ausgabe.py", line 45, in
1
5186
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...
1
2115
by: Alv Mart | last post by:
Hi, I ran makepy for ADO. After I installed a new version of python I have this error: Do you know why could I have this error? >>> from ADODB import Connection,Recordset >>> conn = Connection()
0
1334
by: Jim Kerr | last post by:
Does makepy always respect versioning of interfaces? It appears as though makepy correctly handles versioning of objects you obtain directly, but not for objects you get via a function call. Here's a simple example to illustrate the point. I created the C++-based server for this example by pilfering some code in Andrew Troelsen's book on COM and ATL. car = Dispatch("ScriptibleCoCar.DualCoCar") person =...
2
2175
by: nvhengr | last post by:
Has anyone seen this? When I run the COM Makepy utility and choose Microsoft Excel 9.0 Object Library (1.3), I get an application error message: PythonWin: Pythonwin.exe - Application Error The instruction at "0x77fcc87" referenced memory at "0x0307a705". The memory could not be "read". I do not get this error when I choose the Microsoft Office 9.0 Object Library (2.1).
2
2068
by: Alexander Eisenhuth | last post by:
Hello together, My system: ActivePython 2.4.1 Windows XP I write a COM Server in VC++ 6.0 using ATL. So far so good. While I develop I got sometimes strange behaviour with makepy utility. Today again. :-(
1
2723
by: Steve M | last post by:
When I use the COM Makepy utility on one computer with WindowsXP, ActivePython 2.3 and I select the library Microsoft Word 10.0 Object Library (8.2), things work fine. When I have WindowsXP, ActivePython 2.4 (build 247) and Microsoft Word 11.0 Object Library (8.3), then I get the following SyntaxError, and on two different computers I tested this. More on the error below, but has anyone else had this problem? Will there soon be a newer...
4
3459
by: suzhi18 | last post by:
Hallo, I've a problem getting makepy running. When I start the tool on my machine with doubleclick everything is fine. But when I try this in my Code: makepy.py -i "Microsoft Excel 11.0 Object Library(1.5)" I am getting an Syntax Error and command:
14
3804
by: Trent Mick | last post by:
I'm happy to announce that ActivePython 2.6.0.0 is now available for download from: http://www.activestate.com/Products/activepython/ ActivePython 2.6.0.0 is based on Python 2.6.0. What is ActivePython? ---------------------
0
8520
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
9057
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8936
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
6442
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5800
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
4312
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2953
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
3
1941
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.