DQinYuan / chinese_province_city_area_mapper

一个用于提取简体中文字符串中省,市和区并能够进行映射,检验和简单绘图的python模块
MIT License
1.65k stars 392 forks source link

识别报错: 在识别: 浙江省 织里镇 吴兴区织里镇织纺路731号中通快递2栋4号楼中间. 时报错了: AttributeError: 'bool' object has no attribute 'get' #71

Closed htycode closed 3 years ago

htycode commented 3 years ago

执行下面这行代码 报错了: df = cpca.transform(["浙江省 织里镇 吴兴区织里镇织纺路731号中通快递2栋4号楼中间"], open_warning, cut=False)

异常信息: File "C:\Python37\lib\site-packages\cpca__init__.py", line 198, in _fill_city if umap.get(pca.area): AttributeError: 'bool' object has no attribute 'get'

DQinYuan commented 3 years ago

第二个参数并不是 open_warning,应该写做 open_warning=true/false

不过最新版本已经不支持这个参数了