AttributeError while using codes in notebook

Help
Ka Lok Kam
2014-04-25
2014-04-29
  • Ka Lok Kam

    Ka Lok Kam - 2014-04-25

    Dear developers,

    Version of topo: 0.98
    Version of numpy: 1.8.1

    Detail:
    I am trying to use IPython notebook of SOM Retinotopy. I just simply copy each cell and paste them onto my notebook and then execute them step by step. But when I tried to perform this cell:

    "
    topo.sim.V1.Afferent.grid()
    "

    the error occurs:

    "

    AttributeError Traceback (most recent call last)
    <ipython-input-4-61613b0299b4> in <module>()
    ----> 1 topo.sim.V1.Afferent.grid()

    AttributeError: 'CFProjection' object has no attribute 'grid'
    "

    I do not know how to fix it. Does anyone have an idea about that?

    P.S. Can someone tell me how to install lancet? I did not find a setup.py in their source? Thank you.

     
  • Jean-Luc Stevens

    Hi

    There has been a lot of development since the 0.98 PyPI release. I suspect you may be using the fairly old PyPI version of Topographica which does not have the grid method implemented yet. Have you tried using the latest GitHub version of Topographica? You can find the necessary instructions here.

    As for Lancet, there isn't a PyPI release (or setup.py) just yet. The best way to obtain Lancet is to clone it from GitHub. Alternatively, you can get Lancet together with Topographica (look in the /external folder) if you do 'git submodule update --init' (as described in the instructions I linked to) after you have cloned the Topographica repository.

    Hope that helps,

    Jean-Luc

     
    • Ka Lok Kam

      Ka Lok Kam - 2014-04-26

      Dear Jean,

      After cloning the newest topo, what should I do I order to install them? Using "python topographica" command? I do not really know how to compile them and install...

      Kalok

       
      Last edit: Ka Lok Kam 2014-04-26
  • James A. Bednar

    James A. Bednar - 2014-04-27

    There's no need to compile or install anything, just go to the directory where you cloned it, and run it! E.g. if you are on a Unix or Mac machine, do

    cd wherever-you-cloned-topographica
    ./topographica -g examples/tiny.ty

    On windows you should omit the "./".

    Jim

     
  • James A. Bednar

    James A. Bednar - 2014-04-27

    Oh, and for the SOM retinotopy tutorial, do

    cd wherever-you-cloned-topographica
    cd doc/Tutorials
    ../../topographica -n

    and then point your web browser to the page that it says.

     
  • Jean-Luc Stevens

    Hi

    I've just had a look and I've found that a lot has changed in Topographica since the som_retinotopy tutorial was written - a lot of things work slightly differently way now. Thankfully, we have a tagged commit which we know does work well with this notebook. The tag is called 'CNV-2014'.

    Here is what I think you need to do to get it working...

    git clone https://github.com/ioam/topographica.git
    git checkout CNV-2014
    git submodule update --init

    cd doc/Tutorials
    ../../topographica -n

    Hopefully that will work! We are currently working on updating the tutorials as things begin to stabilize on the development version of Topographica.

    Jean-Luc

     
  • Ka Lok Kam

    Ka Lok Kam - 2014-04-29

    Thank you for your help, Jean and Jim.

    So if I create my own notebook next time, I can also use topo to run my code by simply using:
    ../../ topographica -n

    right?

     
  • James A. Bednar

    James A. Bednar - 2014-04-29

    Right. Just make your new notebook, and then when calling topographica, use the correct relative or absolute path to it, e.g. ../topographica -n if you put your new notebook into a subdirectory of topographica (e.g. topographica/kalokkam/), or ../../topographica -n if you put it into doc/Tutorials/. In the latest IPython notebook (2.0), you can just launch topographica -n from anywhere and then find your notebook file from within your browser, but these instructions should work for any recent IPython version.

    Jim

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks