Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help with code
#1
so i have this code but it wont seem to work can anyone help me?

# Enter Data
tag=raw_input("Enter Discord Tag ")
import time
import progressbar

bar = progressbar.ProgressBar()
for i in bar(range(100)):
    time.sleep(0.04)
print('Found Discord Tag')
usrid=raw_input("Enter User")
import time
import progressbar

bar = progressbar.ProgressBar()
for i in bar(range(100)):
    time.sleep(0.10)
print('Found User ID'), usrid
input('Press ENTER to exit')
But then it comes up with this.

Traceback (most recent call last):
  File "C:\Users\user\Desktop\resolver.py", line 2, in <module>
    tag=raw_input("Enter Discord Tag ")
NameError: name 'raw_input' is not defined
Can anyone help me please
Reply
#2
"raw_input" (Python 2) has been renamed to "input" in Python 3, which you appear to be using. So just change the function name to input.
Reply
#3
ahh thanks fixed it.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020