Esri / arcgis-osm-editor

ArcGIS Editor for OpenStreetMap is a toolset for GIS users to access and contribute to OpenStreetMap through their Desktop or Server environment.
Apache License 2.0
392 stars 129 forks source link

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

Open hhfbffcnhfdghbfvcnbf opened 1 year ago

hhfbffcnhfdghbfvcnbf commented 1 year ago

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

ThomasEmge commented 1 year ago

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

hhfbffcnhfdghbfvcnbf commented 1 year ago

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: @.***>

ThomasEmge commented 1 year ago

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.

hhfbffcnhfdghbfvcnbf commented 1 year ago

The same error will still be reported.

hhfbffcnhfdghbfvcnbf commented 1 year ago

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

ThomasEmge commented 1 year ago

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.

hhfbffcnhfdghbfvcnbf commented 1 year ago

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

ThomasEmge commented 1 year ago

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.

hhfbffcnhfdghbfvcnbf commented 1 year ago

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

ThomasEmge commented 1 year ago

I am looking for a more literal translation of this one

hhfbffcnhfdghbfvcnbf commented 1 year ago

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.

ThomasEmge commented 1 year ago

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.

hhfbffcnhfdghbfvcnbf commented 1 year ago

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