Select to view content in your preferred language

No module named win32.com.client

5935
5
12-17-2013 08:56 AM
MarcoRosa
Emerging Contributor
Hi to all,
i've installed pwin32 to write ax excel file with a python script and after i've published the script in a geoprocessing.
Published correctly,when i launch i have the error No module named win32.com.client. I'm using arcgis suite 10.2 on windows 2008 r2. I read around many post that the problem can be a environment variable or path variable to be set.
Has anyone encountered this issue and can give me any suggest ?

Thank you in advanced

Attach the screenshot of the error i have

Giorgio
Tags (2)
0 Kudos
5 Replies
AndrewChapkowski
Esri Regular Contributor
Did you install the pywin32 x64-bit version on the ArcGIS Server box?
0 Kudos
MarcoRosa
Emerging Contributor
Hi ,  i've installed the 32 bit version , but the operative system is 64 bit ..... this can be the problem ?


thanks
0 Kudos
AndrewChapkowski
Esri Regular Contributor
ArcGIS Server uses 64-bit python, not 32-bit, therefore, you need to install the 64-bit version of win32 on the server machine.  To run the tool local, not published, you need to have the 32-bit version of the module.  It's ok to install both the 32-bit and 64-bit versions of the same module on the same machine if you have both desktop and server installed because you have two seperate installation of python 2.7.x installed on that machine.

Let me know if installing the 64-bit version fixes your issue.
0 Kudos
MarcoRosa
Emerging Contributor
Thanks Andrew , yesterday i was out of the office,  today i'll install the 64 bit version on the same machine , on wich as you correclty say, i have installed both Arcgis desktop and Arcgis server version.
I let you know thank's again

Giorgio
0 Kudos
MarcoRosa
Emerging Contributor
Hi Andrew,
it' works (:D:D:D:D:D:D:D:D:D:D:D:D) , but not without problems .....
Now explain the steps to get the procedur works ...

1) download and install, as yous suggestion, the version 64 bit of win 32 , exactly the file is pywin32-218.win-amd64-py2.7.exe[/B
], previously i installed pywin32-218.win32-py2.7.exe
.

But just this it' not enought to solve the problem: after install pwin 64 bit , i have this error on Open method as described here

xl.Workbooks.Open(file_path)
File "<COMObject <unknown>>", line 8, in Open

Well , the way to fix this is described in this post ... http://stackoverflow.com/questions/12571985/task-scheduler-wont-run-python-script-pywin32-to-open-ex... , at the bottom there's a link to microsoft page ...

To fix ... it's necessary to create these folder :

if you have Windows 2008 Server x64

C:\Windows\SysWOW64\config\systemprofile\Desktop

if you have Windows 2008 Server x86

C:\Windows\System32\config\systemprofile\Desktop


After creating the folder all works good. Hope this will help.

Thank's Andrew for the suggestion, merry christmas to all

Giorgio
0 Kudos