分享

调用Spatial ETL工具时,模型没有属性

 昵称QAb6ICvc 2013-01-31
 Error: 调用Spatial ETL工具时,模型没有属性

文章编号: 38563

软件: ArcGIS - ArcEditor 10 ArcGIS - ArcInfo 10 ArcGIS - ArcView 10

操作系统: Windows XP,Vista, Win 7


错误信息:

在ArcGIS10.0的Python独立脚本中调用Spatial ETL工具时,可能会遇到以下错误:“属性错误:’Model’对象没有属性”。

原因:

    在ArcGIS当前版本中,只要在ArcMap 和 ArcCatalog中勾选Data Interoperability扩展模块就可以调用Spatial ETL工具。

    在ArcGIS10.0中,为了成功调用使用Spatial ETL工具,在Python 独立脚本中必须检查Data Interoperability扩展模块。

解决方法:

以下是避免“模型没有属性“错误以及成功调用Spatial ETL工具的必要信息:
1.为编辑打开Python脚本。
2.导入arcpy模型后,将以下代码复制并粘贴到Python脚本中,然后再使用Spatial ETL工具。
 
class LicenseError(Exception):
    pass
try:
    if arcpy.CheckExtension("DataInteroperability") == "Available":
        arcpy.CheckOutExtension("DataInteroperability")
        print "Checked out \"DataInteroperability\" Extension"
    else:
        raise LicenseError
except LicenseError:
    print "Data Interoperability license is unavailable"
except:
    print arcpy.GetMessages(2))

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多