Script runs on some computers, fails on others.

982
7
Jump to solution
04-23-2017 11:39 PM
GinoMellino
Occasional Contributor

Hi, 

I have a script which extracts land parcel polygons from a master dataset based on various user inputs such as local government area, vegetation type, agricultural land class type, etc. One of the outputs of the tool is an excel spreadsheet which I create using arcpy.TableToExcel_conversion. This works fine on my machine but throws the following error on a colleagues machine. Can anyone offer any insight into why this error is occurring? 

Kind Regards, 
Gino

Traceback (most recent call last):

  File "<string>", line 327, in execute

AttributeError: 'module' object has no attribute 'TableToExcel_conversion'

 

Failed to execute (LandInvestigationShortlistingTool).

0 Kudos
1 Solution

Accepted Solutions
DanPatterson_Retired
MVP Esteemed Contributor

They have arcmap installed on their machine as well I presume?  and what version of ArcMap??? Can you open a python window in arcmap on their machine?  Can you import arcpy?  

View solution in original post

7 Replies
by Anonymous User
Not applicable

Hello,

Are you sharing or using script as tool or script.

Try to create Custom tool using your script and use this with your colleges system.

Most of the time its working without any error.

https://community.esri.com/docs/DOC-8559 

DanPatterson_Retired
MVP Esteemed Contributor

They have arcmap installed on their machine as well I presume?  and what version of ArcMap??? Can you open a python window in arcmap on their machine?  Can you import arcpy?  

JoshuaBixby
MVP Esteemed Contributor

To follow-up on Dan's comments, how are you executing the script, exactly?  Do some of the machines have multiple version or distributions of Python installed?

GinoMellino
Occasional Contributor

Confirmed the issue was with the version of ArcGIS on the target users machine. Rookie mistake...Thanks for your help Dan and everyone. 

SolomonPulapkura
Occasional Contributor III

Does he have the same excel version as you?

Solomon Pulapkura

https://www.vestra.com/gis 

RebeccaStrauch__GISP
MVP Esteemed Contributor

And depending on the Excel/Office version installed, you may also want to make sure that the compatibility patch for Office is installed, if appropriate.

This thread ARc for Desktop 10.1 and Microsoft Office 2013  had a different issue, but I have seen other threads to that installing the patch helped.

Direct download of the patch Download 2007 Office Sy

stem Driver: Data Connectivity Components from Official Microsoft Download Center 

GinoMellino
Occasional Contributor

Hi Guys, 

Thank you for the replies and sorry for the late reply on my part. I think Dan has nailed it, the users are running ArcGIS 10.1 which does not have the Excel tools as I understand they were added at ArcGIS 10.2. I wrongly assumed they would be running the latest version approved by our department, i.e. 10.4.1. 

I will get them upgraded and try again to see if this resolves the problem. 

Cheers for all your help.