473,797 Members | 3,144 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

pywin32 from network install

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\si te-packages\win32c om\client\dynam ic.py", line 251, in
_ApplyTypes_
result = self._oleobj_.I nvokeTypes(*(di spid, LCID, wFlags, retType,
argTypes) + args)
TypeError: Objects of type 'time' can not be converted to a COM VARIANT

Note 1: The same code works when using the local installation of
python/pywin, it only happens when executing the code from a network
"installati on".

Note 2: As mentioned other COM components seem to be working when
running them via pywin from the network install

Note 3: I am passing pywintipes.Time (datetime.datet ime.today()) to a
COM object method which expects a Date argument.

Do I need to change some environment variable/registry settings/other
hack to fix this?

Aug 12 '05 #1
2 3797
ag************@ gmail.com wrote:
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\s ite-packages\win32c om\client\dynam ic.py", line 251, in
_ApplyTypes_
result = self._oleobj_.I nvokeTypes(*(di spid, LCID, wFlags, retType,
argTypes) + args)
TypeError: Objects of type 'time' can not be converted to a COM VARIANT

Note 1: The same code works when using the local installation of
python/pywin, it only happens when executing the code from a network
"installation" .

Note 2: As mentioned other COM components seem to be working when
running them via pywin from the network install

Note 3: I am passing pywintipes.Time (datetime.datet ime.today()) to a
COM object method which expects a Date argument.

Do I need to change some environment variable/registry settings/other
hack to fix this?

Simply moving the win32 install and setting the python path isn't all
you need to do to get a network install working. In addition, you need
to remove the win32 from your local install (or piss around with
sys.path to strip out those local references) as that will automatically
be included. In addition, there is a registry setting you need to
delete which automagically adds to the python path - it's in
HKEY_CURRENT_US ER and HKEY_LOCAL_MACH INE.

That's probably won't solve your problem but it's somethng to be
aware of anyways.

Neil

--

Neil Benn
Senior Automation Engineer
Cenix BioScience
BioInnovations Zentrum
Tatzberg 47
D-01307
Dresden
Germany

Tel : +49 (0)351 4173 154
e-mail : be**@cenix-bioscience.com
Cenix Website : http://www.cenix-bioscience.com

Aug 12 '05 #2
Hmm I have the same problem using python -E... Moreover I do not see
anything strange in the sys.path (Z\LocalApps is my shared folder):

'Z:\\LocalApps\ \examples',
'Z:\\LocalApps\ \python\\python 24.zip',
'Z:\\LocalApps\ \examples',
'Z:\\LocalApps\ \python\\DLLs',
'Z:\\LocalApps\ \python\\lib',
'Z:\\LocalApps\ \python\\lib\\p latwin',
'Z:\\LocalApps\ \python\\lib\\l ibtk',
'Z:\\LocalApps\ \python',
'Z:\\LocalApps\ \python\\lib\\s itepackages',
'Z:\\LocalApps\ \python\\lib\\s itepackages\\Nu meric',
'Z:\\LocalApps' ,
'Z:\\LocalApps\ \python\\lib\\s itepackages\\wi n32',
'Z:\\LocalApps\ \python\\lib\\s ite-packages\\win3\ \lib',
'Z:\\LocalApps\ \python\\lib\\s itepackages\\Py thonwin', '
'Z:\\LocalApps\ \python\\lib\\s ite-packages\\wx-2.6-mswansi'

BUT when the error is thrown out it is:

C:\Program
Files\Python24\ Lib\site-packages\win32c om\client\dynam ic.py...

Aug 12 '05 #3

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

Similar topics

2
5990
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
2622
by: wccppp | last post by:
Hello, I was trying to install pywin32 on one computer which has Python 2.4 installed and it failed. The error message I got was "Can't load Python for pre-install script". I tried unintalling & reinstalling python and that didn't fix the problem.
1
6636
by: mg | last post by:
Hi all, I have reinstalled my Win32 computer last week and I did an update of the project PyWin32 to complete my Python installation. (I have to use sources from CVS for my project !) So, when I run 'python setup.py' in my PyWin32 directory, I have two problem : the version indacated in windows.h and some symbols who are not defined. See the trace :
1
1972
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
6
2036
by: Paul | last post by:
Hello everyone: I am developing a VB.Net Windows Application and I am now ready to create the deployment project for it. This application needs to be installable on a different number of users / clients, and the application has an Access DB out on their network. How can I create a deployment routine where I can have a dialog box prompt for the network share (i.e. \\server\dbfolder) at install-time? Once network the share is specified...
10
4118
by: Woody Splawn | last post by:
I have been developing a ClientServer application on one machine at my office but the time has come to transfer it to the customer. The customer is running a Windows 2000 local area network. I will keep a copy of the applicaiton and all it's code on one of the client machines connected to the local area network at the customers. This machine has a full blown copy of Visual Studio 2003. SQL Server 2000 is the back-end, both at my office...
2
3717
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
2
2053
by: Connected | last post by:
The following info could be useful for anyone getting weird behaviour after installing Altova xmlSPY (so aptly named!) I've just wasted 3 days of my life trying to find out why I've lost network browsing capabilty (network neighborhood) on my xp home network. Recently installed XMLSPY was to blame. Without my permission (other than a vague meaningless sentence in the EULA), Altova's install program opened ports on my firewall and wrote...
1
8783
by: Ally | last post by:
Hi all, I’m looking to plot charts in Excel from python. After some Googling I’ve found the following code: def plot(x, y, xAxisLog=False, yAxisLog=False): # acquire application object, which may start application application = Dispatch("Excel.Application") # create new file ('Workbook' in Excel-vocabulary)
0
9685
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
10469
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...
1
10209
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
9066
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...
1
7560
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
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
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
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
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.