AnsweredAssumed Answered

Why can't I import a python toolbox

Question asked by rvangilst on Jul 10, 2018
Latest reply on Jul 10, 2018 by rvangilst



I am using ArcGIS Desktop 10.6 and would like to publish my python toolboxes using Creategpsddraft but I am running into problems in the very early stages. It cannot read my .pyt toolbox. I get the following error:

IOError: The toolbox file d:/temp/Toolbox.pyt was not found.

I have tried it on two different computers with the same result.


I have created the toolbox.pyt in ArcCatalog and haven't changed it.

import arcpy

toolbox = "d:/temp/Toolbox.pyt"
# toolbox = "d:/temp/Toolbox1.tbx"

If I uncomment the line and import the tbx (which also is just a default toolbox) it works ok.


According to this post it should work just fine.


Can someone please tell me what I am doing wrong!


Thanks Robert