I'm following this guide
http://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/extending-geoprocessing-through-python-modules.htm
I got it to work on arcmap 10.6 (desktop) when the toolbox is in the same folder as the module (src/foo/foo.py). But when I move the toolbox into src/foo/esri/toolboxes, the toolbox has a red x on it in arccatalog.
Inside the toolbox I've tried:
- import foo.foo
- import foo
- import foo from foo
When i right click on toolbox and "check syntax" I keep getting the error
"ImportError: No module named foo"
Reading up on google it sounds like i may need to do something with sys.path.append… but I've tried tons of copied and pasted solutions to no avail.
Other people have said I have to type in the path manually, but that's a problem since i'm hoping to share this to others.
I tried building it, and installing it, and it doesn't show up in arctoolbox. When I have the toolbox in the foo folder, it does show up in arctoolbox after install.
I'm out of things to try and looking for help!
I am creating the project in PyDev Eclipse, and there are no syntax errors or problems with imports.
Best Answer
As commented by @KHibma:
@Luke's comments were:
and
while @MichaelStimson commented that:
I note that you have commented that:
I should also point out that you seem to be using ArcPy with ArcMap but you are referring to ArcGIS Pro documentation which is not always the same.