About 55 results
Open links in new tab
  1. python - How to avoid "NameError: name is not defined" when using a ...

    24 Note that sometimes you will want to use the class type name inside its own definition, for example when using Python Typing module, e.g.

  2. Why do I get "NameError: name '...' is not defined" (or a SyntaxError ...

    File "<input>", line 1, in <module> File "<string>", line 1, in <module> NameError: name 'dummy' is not defined Security considerations with Python 2.7's input: Since whatever user types is evaluated, it …

  3. python - catching NameError and Error Handling - Stack Overflow

    Jun 10, 2014 · Sometimes typos can also result in undefined variable name, and then a NameError. Sounds like your try ... except statements are inside your function, the error is happened before the …

  4. python - NameError: name 'i' is not defined - Stack Overflow

    Mar 21, 2022 · NameError: name 'i' is not defined - Why does this happen? Asked 3 years, 10 months ago Modified 2 years, 7 months ago Viewed 18k times

  5. How to get the name of an exception that was caught in Python?

    How can I get the name of an exception that was raised in Python? e.g.,

  6. python - How do I fix this "Name is not Defined"? - Stack Overflow

    Nov 17, 2014 · Since I've started using Python my main problem is calling variables, exactly how do I do it? For example in this case how do I fix it, or in another code how would I call a variable from one …

  7. python - NameError: name '_name_' is not defined - Stack Overflow

    Aug 12, 2015 · Python executes that directly. If its left out it will execute all the code from the 0th level of indention. is wrong. Python executes everything directly from 0th level indentation, when importing a …

  8. How to fix "undefined name" error message in Python?

    May 4, 2019 · I am creating a simple calculator with Python as my first &quot;bigger&quot; project. I am trying to use def function and when i am trying to call that function it gives &quot;undefined …

  9. Python NameError, variable 'not defined' - Stack Overflow

    the error it returns is: NameError: name 'lives' is not defined I know the code isn't as efficient as possible, this is one of my first projects, however whatever i ...

  10. NameError: name 'python' is not defined - Stack Overflow

    May 19, 2015 · 49 It looks like you are trying to start the Python interpreter by running the command python. However the interpreter is already started. It is interpreting python as a name of a variable, …