蒸熟的土豆

关注

Python local variable ‘x2‘ referenced before assignment

蒸熟的土豆

关注

阅读 75

2022-01-12

出现这种报错,是因为局部变量。需要改成全局变量。

 

 

添加 global x2 即可

相关推荐

秀妮_5519

已解决local variable ‘str‘ referenced before assignment

秀妮_5519 13 0 0

芝婵

解决UnboundLocalError: local variable 'time' referenced before assignment

芝婵 13 0 0

善解人意的娇娇

python报错问题:UnboundLocalError: local variable ‘num‘ referenced before assignment

善解人意的娇娇 61 0 0

归零者245号

python函数常见错误local variable ‘count‘ referenced before assignment

归零者245号 74 0 0

四月天2021

mmdetection3d: local variable ‘beta1‘ referenced before assignment

四月天2021 99 0 0

爱上流星雨

UnboundLocalError: local variable ‘beta1‘ referenced before assignment(adamw.py)

爱上流星雨 50 0 0

君之言之

python错误信息:UnboundLocalError: local variable 'actual_tel_len' referenced before assignment

君之言之 30 0 0

沈芏

出现 local variable ‘new_user‘ referenced before assignment 或者 name ‘new_user‘ is not defined 问题 的解决

沈芏 47 0 0

沈芏

Autowired is not applicable to local variable

沈芏 110 0 0

读思意行

Camunda Variable Scope(Global、Local )

读思意行 14 0 0

精彩评论(0)

0 0 举报