Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tutorial 1: code issues #5

Open
wmeitzen opened this issue Feb 26, 2020 · 0 comments
Open

Tutorial 1: code issues #5

wmeitzen opened this issue Feb 26, 2020 · 0 comments

Comments

@wmeitzen
Copy link

I'm getting lots of errors when I try to run the code for tutorial 1. Kindly advise.

Screen dump:
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
File "egoMouseLook.py", line 162
print len(mouse.ai.q) # print the amount of state/action, reward
^
SyntaxError: invalid syntax
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ nano egoMouseLook.py
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 7, in
import cellular
File "/home/administrator/basic_reinforcement_learning/tutorial1/cellular.py", line 521
print 'Error: invalid colour:', c
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Error: invalid colour:', c)?
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ python egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 7, in
import cellular
File "/home/administrator/basic_reinforcement_learning/tutorial1/cellular.py", line 521
print 'Error: invalid colour:', c
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Error: invalid colour:', c)?
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ nano cellular.py
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ python egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 8, in
reload(cellular)
NameError: name 'reload' is not defined
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 8, in
reload(cellular)
NameError: name 'reload' is not defined
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ cd ..
(base) administrator@ubuntu:/basic_reinforcement_learning$ python tutorial1/egoMouseLook.py
Traceback (most recent call last):
File "tutorial1/egoMouseLook.py", line 8, in
reload(cellular)
NameError: name 'reload' is not defined
(base) administrator@ubuntu:
/basic_reinforcement_learning$ cd tutorial1
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ nano egoMouseLook.py
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
Traceback (most recent call last):
File "egoMouseLook.py", line 133, in
world = cellular.World(Cell, directions=directions, filename='../worlds/waco.txt')
File "/home/administrator/basic_reinforcement_learning/tutorial1/cellular.py", line 102, in init
data = file(filename).readlines()
NameError: name 'file' is not defined
(base) administrator@ubuntu:/basic_reinforcement_learning/tutorial1$ nano egoMouseLook.py
(base) administrator@ubuntu:
/basic_reinforcement_learning/tutorial1$ python3 egoMouseLook.py
egoMouseLook.py:9: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File "egoMouseLook.py", line 134, in
world = cellular.World(Cell, directions=directions, filename='../worlds/waco.txt')
File "/home/administrator/basic_reinforcement_learning/tutorial1/cellular.py", line 102, in init
data = file(filename).readlines()
NameError: name 'file' is not defined

@wmeitzen wmeitzen changed the title Tutorial 1: print and other code issues Tutorial 1: code issues Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant