Select to view content in your preferred language

Detect Object Using Deep Learning: Unable to initialize python raster function with scalar arguments.

407
4
12-16-2024 06:49 AM
Labels (2)
fangjincheng
New Contributor

Hello,everyone .

when I use detect objects,I meet this problem,but I dont konw how to solve it.Could you help me?

problem:

Unable to initialize python raster function with scalar arguments. [f:\arcgis pro\Resources\Raster\Functions\System\DeepLearning\ArcGISLearn\ArcGISObjectDetector.py]
Traceback (most recent call last):
File "f:\arcgis pro\Resources\Raster\Functions\System\DeepLearning\ArcGISLearn\ArcGISObjectDetector.py", line 75, in initialize
with open(model, "r") as f:
TypeError: expected str, bytes or os.PathLike object, not NoneType

Unable to initialize python raster function with scalar arguments.

fangjincheng_1-1734360497895.png

fangjincheng_2-1734360540139.png

 

 

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

002667: Cannot load python module.—ArcGIS Pro | Documentation

strange, the error number doesn't correspond to what you have posted, but I would check to ensure that you have the correct version of the deep learning framework in the link 


... sort of retired...
0 Kudos
fangjincheng
New Contributor

Thanks for your reply, now I find this issue maybe connect with my virtual environment.but i still dont know how to solve it

fangjincheng_0-1734363020088.png

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

From the help topics

Repair an environment—ArcGIS Pro | Documentation

and it may be necessary to do a clean uninstall and reinstall of Pro should issues persist

How To: Perform a Clean Uninstall and Reinstall of ArcGIS Pro


... sort of retired...
0 Kudos
ShivaniPathak
Esri Contributor

Hi @fangjincheng ,

Could you please share the version of ArcGIS Pro you are using? Additionally, can you confirm how you created the deep learning environment? If you didn’t use the Deep Learning Libraries installer to set up the environment, you can download it from this page: https://github.com/Esri/deep-learning-frameworks.

The Deep Learning Libraries installer has been available since ArcGIS Pro version 2.6.

0 Kudos