arcgis-osm-editor icon indicating copy to clipboard operation
arcgis-osm-editor copied to clipboard

When I call the tool OSMGPFileLoader_osmtools with arcpy, I keep getting an error (000584).

Open hhfbffcnhfdghbfvcnbf opened this issue 2 years ago • 13 comments
trafficstars

1JX{Z$%%KBTO%P)J%EO ZTM Z@MFD(MX3BB A RND 6$7`V

hhfbffcnhfdghbfvcnbf avatar Jul 16 '23 07:07 hhfbffcnhfdghbfvcnbf

Could you please specify what version of ArcMap you are using?

ThomasEmge avatar Jul 16 '23 18:07 ThomasEmge

Hello, I am very glad to receive your reply. The version of ArcMap I use is 10.6.

---Original--- From: "Thomas @.> Date: Mon, Jul 17, 2023 02:46 AM To: @.>; Cc: @.@.>; Subject: Re: [Esri/arcgis-osm-editor] When I call the toolOSMGPFileLoader_osmtools with arcpy, I keep getting an error (000584). (Issue#243)

Could you please specify what version of ArcMap you are using?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

hhfbffcnhfdghbfvcnbf avatar Jul 16 '23 19:07 hhfbffcnhfdghbfvcnbf

Please do try to disable background processing as outlined at the beginning of this article. https://desktop.arcgis.com/en/arcmap/10.6/analyze/executing-tools/foreground-and-background-processing.htm

If the tool executes in foreground, then please install the 64-bit version of the tools (which are also part of the download from github) and then you can re-enable the background geoprocessing option.

ThomasEmge avatar Jul 16 '23 19:07 ThomasEmge

The same error will still be reported.

hhfbffcnhfdghbfvcnbf avatar Jul 17 '23 03:07 hhfbffcnhfdghbfvcnbf

Does this have anything to do with compiling software? I'm using VSCode.

hhfbffcnhfdghbfvcnbf avatar Jul 17 '23 03:07 hhfbffcnhfdghbfvcnbf

In case you want to build the tools from source, then you'll need to use VisualStudio. However, I'd recommend to stay with the already built tools and go with the installers for now.

If you are using VSCode to execute a script, you'll need to ensure to reference the ArcMap Python environment as well as loading the toolboxes. Please do take a look at the help documentation for each of the tools for code and syntax examples on how to invoke the tools from a scripting environment.

ThomasEmge avatar Jul 17 '23 14:07 ThomasEmge

My code was written with reference to the tool's help documentation, as shown in the image below. 屏幕截图 2023-07-17 233949

hhfbffcnhfdghbfvcnbf avatar Jul 17 '23 15:07 hhfbffcnhfdghbfvcnbf

Could you please translate your error message to English? I am hoping for some more clues at which point the script is running into an error.

ThomasEmge avatar Jul 17 '23 15:07 ThomasEmge

Garbled should mean that the validation process of this tool is invalid and the execution (OSMGPFileLoader) fails.

hhfbffcnhfdghbfvcnbf avatar Jul 17 '23 16:07 hhfbffcnhfdghbfvcnbf

I am looking for a more literal translation of this one

ThomasEmge avatar Jul 17 '23 16:07 ThomasEmge

Sorry, there is a problem with the encoding of the content in this image, and I can't translate the specific content, but the general content is that the verification process of this tool is invalid.

hhfbffcnhfdghbfvcnbf avatar Jul 17 '23 16:07 hhfbffcnhfdghbfvcnbf

I think you discovered an error in the help documentation. Please change your last line to the following

arcpy.OSMGPFileLoader_osmtools("D:/out/0.osm", "CONSERVE_MEMORY", "", nameOfTargetDataset, nameOfPointFeatureClass, nameOfLineFeatureClass, nameOfPolygonFeatureClass)

meaning that an additional parameter is needed for the selected set of attributes.

ThomasEmge avatar Jul 17 '23 18:07 ThomasEmge

Thank you very much for your help, after following your prompts to modify the code, the code will work.

hhfbffcnhfdghbfvcnbf avatar Jul 18 '23 05:07 hhfbffcnhfdghbfvcnbf