Sergio20 / aima-python

Automatically exported from code.google.com/p/aima-python
0 stars 0 forks source link

Cannot create EnvGUI (EnvCanvas missing) #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. $  cd aima-python
2. $ python
3.  >>> import agents
4.  >>> v = VacuumEnvironment()
5. >>> e = EnvGUI(v)

What is the expected output?

Some Tkinkter window with the Environment

 What do you see instead?

An empty Tkinkter window and an error message at the repl:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/rickard/devel/ArtificialIntelligence/aima/aima-python/agents.py", line 617, in 
__init__
    canvas = EnvCanvas(self, env, cellwidth, n)
NameError: global name 'EnvCanvas' is not defined

What version of the product are you using? On what operating system?

Svn revision 29 from Google Code on Mac OS X 10.4.11

Please provide any additional information below.

The commentary at the top of the agents.py file mentions the EnvCanvas class 
but the file 
doesn't contain a definition of it. Perhaps it is left as an excercise for the 
reader.. :-)

Original issue reported on code.google.com by ricka...@gmail.com on 29 Jan 2008 at 1:57

GoogleCodeExporter commented 8 years ago
Just used an earlier version and copied the missing part which defines 
EnvCanvas and the test.
To test this - type the following commands in the interactive interpreter at 
../aima-python
>>> from agents import *
>>> test_gui()

Original comment by chandrak...@gmail.com on 20 Sep 2011 at 12:57

Attachments:

GoogleCodeExporter commented 8 years ago
@chandrak - thanks.  For the record, it looks like the "earlier version" you 
merged the old code into to produce the agents.py which you attaged was about 
r63.

It seems that the EnvCanvas class was removed in r29 by Peter:

 r29 | peter.norvig | 2008-01-12 20:15:25 -0700 (Sat, 12 Jan 2008) | 3 lines
 Fix doctests

That's the whole comment.  It's not clear to me what the issue was, or what the 
plan is.  Any other input?

Original comment by neal...@gmail.com on 28 Jul 2012 at 11:49