Esri / ArcREST

python package for REST API (AGS, AGOL, webmap JSON, etc..)
Apache License 2.0
192 stars 155 forks source link

ArcREST append_fc_to_service #268

Closed MapMujer closed 8 years ago

MapMujer commented 8 years ago

I get mixed results when using the append_fc_to_service found in the zip folder (https://github.com/Esri/ArcREST/releases/tag/3.5.3). It works when I append polygons (6 records) from a file geodatabase stored on my desktop to my hosted feature layer. I change the itemID, layerName, and fc to point to a new file geodatabase containing lines (1020+ records) and I get the following error: Traceback (most recent call last): File "....\append_fc_toservice.py", line 70, in line, filename, synerror = trace() File "....\append_fc_toservice.py\append_fc_to_service_updated.py", line 17, in trace tb = sys.exc_info()[2] NameError: global name 'sys' is not defined

Both file geodatabases contain 1 feature class and use domains. The hosted services were both published from an .mxd

Any help is appreciated.

MikeMillerGIS commented 8 years ago

Can you try the current version in master?

MapMujer commented 8 years ago

Thank you for the response. I am using Version 3.5.3 Release. Is this the current version? I also tried the ArcRESTToolbox.tbx and it produced similar results. I tried the script again with a subset of my data and it works properly. Is there a max number of features that can be added via the append tool?

achapkowski commented 8 years ago

@MapMujer - try pulling the latest download from here: https://github.com/Esri/ArcREST/archive/master.zip

MapMujer commented 8 years ago

Yup that is the one I am using. I can modify my workflow so that it doesn't try to append all of the records. Thank you for your assistance. Keep up the good work. These tools are amazing!

MikeMillerGIS commented 8 years ago

Paul resolved an issue with the trace, if you run it again with the current version in master you should get the real error message.

MapMujer commented 8 years ago

Thank you. I ran it again and got the following error: origin - attribute not implemented in Item class. supportsMultiScaleGeometry - attribute not implemented in Feature Layer. error on line: line 61 (results = fl.addFeatures(fc=fc,attachmentTable=atTable) error in file name: C:\Users\NAME\Desktop\samples\append_fc_to_service.py with error message: ValueError: Expecting object: line 1 column 55601 (char 55600)

Tried the toolbox as well and the correct number of rows are appended but they are all blank.

MikeMillerGIS commented 8 years ago

Is this line or polygon data? Does it have true curves?

MapMujer commented 8 years ago

It is line data and yes it has true curves.

MikeMillerGIS commented 8 years ago

You need to remove true curves as the feature to json does not convert them correctly. Use General prior to this process.

MapMujer commented 8 years ago

I should have know. Thank you for all of your assistance

MikeMillerGIS commented 8 years ago

no problem, let us know if that works so we can close the issue.

MapMujer commented 8 years ago

Worked like a charm! Thanks again for you help.

MikeMillerGIS commented 8 years ago

Great, thanks for letting us know.