[英]Getting Name Error when the variable is defined [on hold]
Here is my code: https://pastebin.com/XssyGGud I get this error:这是我的代码: https://pastebin.com/XssyGGud我收到此错误:
Traceback (most recent call last):
File "main.py", line 163, in <module>
menue()
File "main.py", line 124, in menue
if progress == 0:
NameError: name 'progress' is not defined
I am using python 3.7.4 on linux.我在 linux 上使用 python 3.7.4。
In [64]: a
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-64-3f786850e387> in <module>
----> 1 a
NameError: name 'a' is not defined
In [65]: try:
...: if a==0:
...: print('a is 0')
...: except:
...: print('No errors to see here')
...:
No errors to see here
In [66]: try:
...: if a==0:
...: print('a is 0')
...: except NameError:
...: print('No errors to see here')
...:
No errors to see here
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.