GoogleCloudPlatform / tensorflow-without-a-phd

A crash course in six episodes for software developers who want to become machine learning practitioners.
Apache License 2.0
2.79k stars 911 forks source link

NameError: name 'raw_input' is not defined #5

Closed pococito closed 6 years ago

pococito commented 6 years ago

After the end of the 1st epoch:

>>>>>>> epoch 1
>>> Rollout phase
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pawel/M/outrun/tensorflow-without-a-phd/tensorflow-rl-pong/trainer/task.py", line 292, in <module>
    main(args)
  File "/home/pawel/M/outrun/tensorflow-without-a-phd/tensorflow-rl-pong/trainer/task.py", line 204, in main
    _ = raw_input('episode done, press Enter to replay')
NameError: name 'raw_input' is not defined

raw_input() is not supported in Python 3.

As per Guido's explanation: https://docs.python.org/3/whatsnew/3.0.html https://www.python.org/dev/peps/pep-3111/

raw_input() was renamed to input()

martin-gorner commented 6 years ago

Oops, sorry about that. Let me fix it really quick.

pococito commented 6 years ago

Hi Martin, no worries, there's my pull request already...

martin-gorner commented 6 years ago

fixed aw sorry, I fixed it before i saw your pul request