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? 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
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... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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.
|
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 :
|
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
|
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...
| |
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...
|
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
|
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...
|
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)
|
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...
|
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...
| |
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,...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |