Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

ArcRest Toolbox - Tool "Remove Data from Feature Service" - Python Compatibility Issues #317

Closed
sharpering opened this issue Jan 13, 2017 · 1 comment

Comments

@sharpering
Copy link
Contributor

ArcRest or ArcRestHelper

ArcRestToolbox, Tool "Remove Data from Feature Service"

Version or date of download

Master (Download: 13. January 2017)

Bug or Enhancement

Python Compatibility Issues

Repo Steps or Enhancement details

When I am using the tool "Remove Data from Feature Service" in ArcGIS Pro 1.3 and ArcGIS Pro 1.4 I get the following two error messages:

(1)

SyntaxError: invalid syntax (delete_rows_from_fs.py, line 158)
Failed to execute (DeleteFeaturesFromFeatureService).

Solution: I have to change the Python 2.x syntax except (common.ArcRestHelperError), e: to the Python 3.x syntax except (common.ArcRestHelperError) as e:.

(2)

Traceback (most recent call last):
  File "C:\Users\svha\Desktop\ArcREST\tools\src\delete_rows_from_fs.py", line 193, in <module>
    for i in xrange(arcpy.GetArgumentCount()))
NameError: name 'xrange' is not defined
Failed to execute (DeleteFeaturesFromFeatureService).

Solution: I have to change the Python 2.x syntax for i in xrange(arcpy.GetArgumentCount())) to the Python 3.x syntax for i in range(arcpy.GetArgumentCount())).

I haven´t checked the other scripts from the toolbox, but i think that there might be also syntax issues in the tools.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants