使用产品:supermap-idesktopx-11.2.0-windows-x64-bin、supermap-iobjectsjava-11.2.0-win-all、supermap-iobjectspy-11.2.0
操作系统:win10 x64
数据类型:udbx
问题详细描述:
在Pycharm中使用Anaconda创建的Python3.7解释器,并安装好了Java和Python的组件模块并按文档配置,在代码开头导入相关的api时并没有报错,但是运行以下代码时,发现报错,个人推测应该是许可原因,但我在网上只看到了iobjectsjava的在线试用许可配置方法,没有iobjectspy的相关方法,如何在supermap的iobjectspy中配置在线试用许可?
问题重现步骤:
代码:
#!/usr/bin/env python3
# coding=utf-8
from iobjectspy.analyst import calculate_slope
dem_str = r"G:\MyTestProject\SuperMapTest\DataImport.udbx\fz_dem_sub"
out_str = r"G:\MyTestProject\SuperMapTest\DataImport.udbx\fz_slope_sub"
if __name__ == '__main__':
calculate_slope(input_data=dem_str, slope_type=1, z_factor=1, out_data=out_str)
报错:
Traceback (most recent call last):
File "G:\MyTestProject\SuperMapPy37\main.py", line 9, in <module>
calculate_slope(input_data=dem_str, slope_type=1, z_factor=1, out_data=out_str)
File "I:\teamctiy\BuildAgent\work\test_trunk/iobjectspy/_jsuperpy\analyst\sa.py", line 5958, in calculate_slope
File "I:\teamctiy\BuildAgent\work\test_trunk/iobjectspy/_jsuperpy\_utils.py", line 565, in check_lic
RuntimeError: hasp_feature_not_found