Graphical_Datasheets icon indicating copy to clipboard operation
Graphical_Datasheets copied to clipboard

NameError: name 'raw_input' is not defined

Open pixelwaster opened this issue 4 years ago • 1 comments

Ladyada sent me here, sort of, https://www.youtube.com/watch?v=tAKLygjfO_U

I am using Python 3.9 on Windows 19. I am trying to run the script tagscript.py using PyNPP. All but one of the print statements were missing parentheses. While I am not versed in Python, I can read and understand some of it. The output below however has stopped me.

Make sure the python script is in the same folder as the file.
Traceback (most recent call last):
  File "C:\Users\Michael\Documents\Graphical_Datasheets\tagscript.py", line 107, in <module>
    myfile = raw_input("Enter file name without the .csv extension (eg. ESP8266/Thing): ")
NameError: name 'raw_input' is not defined

pixelwaster avatar May 10 '21 03:05 pixelwaster

Hi!

Sorry, I just saw this when updating something. The script was originally written for Python 2 as opposed to Python 3. What I can say from the error is that it looks like a compatibility issue between Python 2 and 3 and the associated packages (e.g. certain functions that were defined for Python 2 do not work for Python 3). I've just been using the old packages and Python 2.

It's been on my mind to revisit mshorter's Python script. Hmm, I'll need to put this in my queue to update.

bboyho avatar Jul 02 '21 18:07 bboyho