Python ArcPy AttributeError:&x27;模块';对象没有属性';FromGeohash';

Python ArcPy AttributeError:&x27;模块';对象没有属性';FromGeohash';,python,gis,arcpy,geohashing,Python,Gis,Arcpy,Geohashing,我试图在Arcpy中使用FromGeohash方法,但失败了。这是我的密码: import arcpy spatial_reference = arcpy.SpatialReference(4326) print spatial_reference extent = arcpy.FromGeohash('9q8yyx') 这给了我一个错误: Traceback (most recent call last): File "C:/Python27/ArcGIS10.7/Scripts

我试图在Arcpy中使用FromGeohash方法,但失败了。这是我的密码:

import arcpy
spatial_reference = arcpy.SpatialReference(4326)
print spatial_reference
extent = arcpy.FromGeohash('9q8yyx')
这给了我一个错误:

    Traceback (most recent call last):
  File "C:/Python27/ArcGIS10.7/Scripts/Geohash_Converter.py", line 4, in <module>
    extent = arcpy.FromGeohash('9q8yyx')
AttributeError: 'module' object has no attribute 'FromGeohash'
回溯(最近一次呼叫最后一次):
文件“C:/Python27/ArcGIS10.7/Scripts/Geohash_Converter.py”,第4行,在
extent=arcpy.FromGeohash('9q8yyx')
AttributeError:“模块”对象没有属性“FromGeohash”

谁能告诉我是什么引起的?Arcpy似乎已正确导入。

FromGeohash函数似乎仅在Arcpy的ArcPro版本中可用。对于ArcMap版本(10.6),如果尝试导入,则会出现错误:

from arcpy import FromGeohash

Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: cannot import name FromGeohash
从arcpy导入从GeoHash
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:无法从GeoHash导入名称
另外,我能找到的FromGeohash的唯一文档是ArcGIS Pro。在ArcMap文档中,我能找到的关于Geohash的唯一提及是针对


因此,您可能需要使用ArcGIS Pro python解释器,或者使用不同的模块来解码geohash。看起来这可能有效?

看起来FromGeohash函数仅在ArcPro版本的ArcPy中可用。对于ArcMap版本(10.6),如果尝试导入,则会出现错误:

from arcpy import FromGeohash

Traceback (most recent call last):
  File "<input>", line 1, in <module>
ImportError: cannot import name FromGeohash
从arcpy导入从GeoHash
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
ImportError:无法从GeoHash导入名称
另外,我能找到的FromGeohash的唯一文档是ArcGIS Pro。在ArcMap文档中,我能找到的关于Geohash的唯一提及是针对

因此,您可能需要使用ArcGIS Pro python解释器,或者使用不同的模块来解码geohash。看起来这样行吗