美文网首页
python各种错误

python各种错误

作者: 啊啊啊啊啊1231 | 来源:发表于2020-03-28 16:44 被阅读0次

python numpy version not compatible:

pip3 install/uninstall xxx

TypeError: sequence item 0: expected str instance, bytes found

此错误就是因为需要string类型的数据,但是你的数据(x)是byte型。

解决方法:

1x.decode()

for dict type object: AA

for jap_key, jap_val in AA.items():

print(jap_key,jap_val)

每次的jap,jap_val的值都是不一样。如何统一呢?

.sh permission not allowed

chmod u+x mc.sh

./mc.sh

sequence_word_list.shape()   TypeError: 'tuple' object is not callable 

改为 sequence_word_list.shape

name '_combine_multi_modality_input' is not defined

class xx中定义的_xxx_ 函数都是内部私有变量。彼此之间像是居住在一栋楼的邻居,没有接触。彼此的调用需要通过楼栋委员会。因此如果需要调用_combine_multi_modality_input需要引入self._combine_multi_modality_input().

经常会遗忘的是函数返回return.如果没有在def func_A()后面写入return函数,那么在实际调用func_A时,返回值为空。

bdb.BdbQuit

ctrl + D

相关文章

网友评论

      本文标题:python各种错误

      本文链接:https://www.haomeiwen.com/subject/rtlsuhtx.html