I have a python toolbox that is extracting layers from a feature service. The tools to extract shapefiles and file geodatabases work fine since it's mostly running the out of the box tools. However, I have a workflow that requires DGNs to be extracted while using a Seed and Cell file for custom line styles and point symbols. In order to do that, I have a Spatial ETL tool created in Data Interoperability. The Spatial ETL works fine when I run it via Model Builder.
My issue is I'm trying to import the .atbx toolbox into my python toolbox so I can run either the Model I created or the Spatial ETL directly.
I'm using:
arcpy.ImportToolbox(toolboxPath, "DataExtraction")
When working through the tool, it appears the tool is getting imported correctly. However, when I try and run the Model or Spatial ETL tool by calling them with this:
I get a really really odd error:
File "\\serverName\gisdata\DataExtraction\ExtractCADData.atbx", line 62, in GISToCADwPortal
Ø- dû×ÀÚÒý˜"rñ(úÄMÔ%
^^^^
I'm not sure where to find line 62 because it's not referring to line 62 within the Python toolbox.
Any help anyone can provide would be greatly appreciated!
Thank you,
Matt
This is definitely an encoding error, have you inspected the variables you're passing to the function? It could also be toolbox encryption breaking the syntax.