Loading ...
Sorry, an error occurred while loading the content.

Error messages running the AIMA Python code

Expand Messages
  • Antti
    I tried to run the AIMA Python modules in the way that was indicated in this newsgroup, namely by running the Python file doctests.py according to the
    Message 1 of 3 , Jun 16, 2012
    View Source
    • 0 Attachment
      I tried to run the AIMA Python modules in the way that was indicated
      in this newsgroup, namely by running the Python file doctests.py
      according to the instructions given in the source files.

      However, the process ended with error messages as follows.

      First I checked with svn that the files in my directories were up to
      date:

      Start of Quoted Output -------------------------------------------

      c:\AIMA_Python>command
      command

      c:\AIMA_Python>svn checkout http://aima-python.googlecode.com/svn/trunk/ aima-python-read-only
      Checked out revision 201.

      c:\AIMA_Python>

      End of Quoted Output --------------------------------------------


      then I attempted to run the Python code, with the following error
      messages:


      Start of Quoted Output ------------------------------------------

      Microsoft Windows [versio 6.1.7601]
      Copyright (c) 2009 Microsoft Corporation. Kaikki oikeudet pidätetään.

      c:\AIMA_Python\aima-python-read-only>\python26\python doctests.py -v *.py
      \python26\python doctests.py -v *.py
      Traceback (most recent call last):
      File "doctests.py", line 22, in <module>
      for arg in args for name in glob.glob(arg)]
      File "C:\AIMA_Python\aima-python-read-only\learning.py", line 562, in <module>
      attrnames="Rings Distressed Temp Pressure Flightnum")
      File "C:\AIMA_Python\aima-python-read-only\learning.py", line 60, in __init__
      self.examples = parse_csv(DataFile(name+'.csv').read())
      File "C:\AIMA_Python\aima-python-read-only\utils.py", line 677, in DataFile
      return AIMAFile(['..', 'data', name], mode)
      File "C:\AIMA_Python\aima-python-read-only\utils.py", line 673, in AIMAFile
      return open(apply(os.path.join, [dir] + components), mode)
      IOError: [Errno 2] No such file or directory: 'c:\\AIMA_Python\\aima-python-read-only\\..\\data\\orings.csv'

      c:\AIMA_Python\aima-python-read-only>\python26\python doctests.py *.py
      \python26\python doctests.py *.py
      Traceback (most recent call last):
      File "doctests.py", line 22, in <module>
      for arg in args for name in glob.glob(arg)]
      File "C:\AIMA_Python\aima-python-read-only\learning.py", line 562, in <module>
      attrnames="Rings Distressed Temp Pressure Flightnum")
      File "C:\AIMA_Python\aima-python-read-only\learning.py", line 60, in __init__
      self.examples = parse_csv(DataFile(name+'.csv').read())
      File "C:\AIMA_Python\aima-python-read-only\utils.py", line 677, in DataFile
      return AIMAFile(['..', 'data', name], mode)
      File "C:\AIMA_Python\aima-python-read-only\utils.py", line 673, in AIMAFile
      return open(apply(os.path.join, [dir] + components), mode)
      IOError: [Errno 2] No such file or directory: 'c:\\AIMA_Python\\aima-python-read-only\\..\\data\\orings.csv'

      c:\AIMA_Python\aima-python-read-only>

      End of Quoted Output --------------------------------------------


      I wonder if somebody more knowledgeable about the workings of the AIMA
      Python code can help.


      yours, Antti J Ylikoski
      Helsinki, Finland, the E.U.
      antti.ylikoski@...
      http://www.hut.fi/~ajy/
    • Conrad Taylor
      Antti, you need to make sure that you have downloaded the following directory: aima-data Also, it needs to be in the correct location. For example, if main
      Message 2 of 3 , Jun 23, 2012
      View Source
      • 0 Attachment
        Antti, you need to make sure that you have downloaded the following directory:

        aima-data

        Also, it needs to be in the correct location.  For example, if main source is located in here:

        <root_path>/aima-python

        Then the data directory must be located here:

        <root_path>/aima-data

        In short, the data directory and the main source must be under the same parent directory.  If you need any further assistance, please post another message to the group.

        --

        Think different and code well,

        -Conrad


      • Conrad Taylor
        ... svn checkout *http*://aima-data.googlecode.com/svn/trunk/ aima-data ... -- * * *Think different and code well*, -Conrad
        Message 3 of 3 , Jun 23, 2012
        View Source
        • 0 Attachment
          On Sat, Jun 23, 2012 at 5:07 PM, Conrad Taylor <conradwt@...> wrote:
          Antti, you need to make sure that you have downloaded the following directory:

          aima-data


          svn checkout http://aima-data.googlecode.com/svn/trunk/ aima-data
           
          Also, it needs to be in the correct location.  For example, if main source is located in here:

          <root_path>/aima-python

          Then the data directory must be located here:

          <root_path>/aima-data

          In short, the data directory and the main source must be under the same parent directory.  If you need any further assistance, please post another message to the group.

          --

          Think different and code well,

          -Conrad





          --

          Think different and code well,

          -Conrad


        Your message has been successfully submitted and would be delivered to recipients shortly.