pywin32 from network install

Discussion in 'Python' started by agostino.russo@gmail.com, Aug 12, 2005.

  1. Guest

    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, 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.datetime.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, 2005
    #1
    1. Advertising

  2. Neil Benn Guest

    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\site-packages\win32com\client\dynamic.py", line 251, in
    >_ApplyTypes_
    > result = self._oleobj_.InvokeTypes(*(dispid, 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.datetime.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_USER and HKEY_LOCAL_MACHINE.

    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 :
    Cenix Website : http://www.cenix-bioscience.com
    Neil Benn, Aug 12, 2005
    #2
    1. Advertising

  3. Guest

    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\\python24.zip',
    'Z:\\LocalApps\\examples',
    'Z:\\LocalApps\\python\\DLLs',
    'Z:\\LocalApps\\python\\lib',
    'Z:\\LocalApps\\python\\lib\\platwin',
    'Z:\\LocalApps\\python\\lib\\libtk',
    'Z:\\LocalApps\\python',
    'Z:\\LocalApps\\python\\lib\\sitepackages',
    'Z:\\LocalApps\\python\\lib\\sitepackages\\Numeric',
    'Z:\\LocalApps',
    'Z:\\LocalApps\\python\\lib\\sitepackages\\win32',
    'Z:\\LocalApps\\python\\lib\\site-packages\\win3\\lib',
    'Z:\\LocalApps\\python\\lib\\sitepackages\\Pythonwin', '
    'Z:\\LocalApps\\python\\lib\\site-packages\\wx-2.6-mswansi'

    BUT when the error is thrown out it is:

    C:\Program
    Files\Python24\Lib\site-packages\win32com\client\dynamic.py...
    , Aug 12, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kal
    Replies:
    1
    Views:
    9,502
    Kevin Spencer
    Jun 21, 2004
  2. David Lees
    Replies:
    2
    Views:
    688
    David Lyon
    May 12, 2009
  3. Mark Hammond
    Replies:
    9
    Views:
    628
    David Lyon
    May 14, 2009
  4. David Lees
    Replies:
    2
    Views:
    1,453
    Gabriel Genellina
    Sep 3, 2009
  5. train
    Replies:
    0
    Views:
    1,280
    train
    May 15, 2010
Loading...

Share This Page