PYES異常: TypeError: 'NoneType' object is not callable
阿新 • • 發佈:2019-02-05
在執行pyes指令碼時報出以下異常
Traceback (most recent call last):
File "indextest.py", line 18, in <module>
conn.indices.put_mapping("test-type", {'properties':mapping}, ["test-index"])
File "/usr/lib/python2.7/site-packages/pyes/managers.py", line 440, in put_mapping
return self.conn._send_request('PUT' , path, mapping, params=parameters)
File "/usr/lib/python2.7/site-packages/pyes/es.py", line 486, in _send_request
raise_if_error(response.status, decoded)
File "/usr/lib/python2.7/site-packages/pyes/convert_errors.py", line 74, in raise_if_error
bits = error.split('[', 1)
TypeError: 'NoneType' object is not callable
這個異常通常都是由mapping中的部分欄位型別設定錯誤,或者索引和對映書寫有錯誤,以及格式錯誤導致的。