Open lcabon258 opened 6 months ago
Remove the try and except block in line 9-15 in the .pyt file can make the error show in the AGP.
The .pyt seems to execute as a main module in the AGP. Potential solutions includes in the following discussion: 1 How can I do relative imports in Python?](https://stackoverflow.com/questions/72852/how-can-i-do-relative-imports-in-python) 2. How to resolve: attempted relative import with no known parent package [duplicate] 3 PEP 366 – Main module explicit relative imports 4 PEP 302 – New Import Hooks
Modifying the import clauses below:
from .. import gdalio as gio
from .. import ppt
Which doesn't work well. The following error occurs:
Traceback (most recent call last):
File "<string>", line 9, in <module>
ImportError: attempted relative import with no known parent package
The latest commit should fix the problem. @JasmineWanTingWei Please try the toolbox again.
目前計畫的目錄規劃中,ArcGIS Pro的工具箱 .pyt 會遇到無法匯入位於母資料夾的模組們,並造成錯誤。 使用確認文法功能時顯示的錯誤: