ioam / topographica

A general-purpose neural simulator focusing on topographic maps.
topographica.org
BSD 3-Clause "New" or "Revised" License
53 stars 32 forks source link

tkgui not working (topoconsole doesn't appear) #611

Open ceball opened 9 years ago

ceball commented 9 years ago

I was at CNV-2014-638-ga3ab76f and ./topographica -g worked fine. I updated to the most recent version (CNV-2014-700-g6112f71) and now ./topographica -g gives me a topoconsole window that's not expanded. If I type topo.guimain.mainloop() the topoconsole expands but then I can't use the console any more.


(likely to be irrelevant from here on...) I'm using anaconda python 2.1.0 on DICE, but probably that's irrelevant, because Jan also reports the same problem on Ubuntu (not sure which version) using the system python. I tried to use DICE's python but I got a syntax error earlier on in the startup unrelated to this issue (DICE's python is too old, I guess? I tried dice-pyenv CNV too, but it said Environment CNV could not be found). I also tried to use Ubuntu 12's python, but I guess my matplotlib version is too old (ImportError: cannot import name rc_params_from_file) and when I did pip install --user --upgrade matplotlib I got:

The required version of distribute (>=0.6.28) is not available, and can't be installed while this script is running. Please install a more recent version first, using 'easy_install -U distribute'.

I tried that command, but got

[Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages'

I didn't want to use sudo, so I tried the easy_install command again with --user and it worked (because I have ~/.local/bin on my path, I guess), so I tried to pip install matplotlib again but that failed with several pages of instructions...so I stopped there (I guess I need to install some libraries).

jbednar commented 9 years ago

When I update to the most recent version, I get 0.9.8-1343-g1c6dc94. Maybe you're on a branch?

BTW, to get the version number more easily, I just added a commandline option:

$ ./topographica --version 0.9.8-1343-g1c6dc94

ceball commented 9 years ago

Sorry, I was just trying to record some historical info: I had a version where the gui was working fine, I did a git pull/git submodule update (i.e. only git operations), then the gui no longer worked. That version could well be on a branch, and some time I'll confirm that (and could map back to nearest ioam/topographica's master commits, to help track down the problem if necessary).

I had the same problem (topoconsole window not expanding) when I did a fresh clone of the most recent version of github/ioam/topographica on an Ubuntu 12 machine, using anaconda. And it sounds like Jan had the problem on a fresh clone on Ubuntu 14 (using the system python). But I guess you're saying this problem doesn't happen for you? Interesting.


Just for the record, here's what I did (as sent to Jan):

(set up python environment) $ wget http://repo.continuum.io/archive/Anaconda-2.1.0-Linux-x86_64.sh $ chmod +x ./Anaconda-2.1.0-Linux-x86_64.sh $ ./Anaconda-2.1.0-Linux-x86_64.sh -b -p ~/topo-env $ export PATH=~/topo-env:~/topo-env/bin:${PATH} $ conda install --yes --channel https://conda.binstar.org/oarodriguez gmpy

(install git topographica) $ git clone git://github.com/ioam/topographica.git $ cd topographica $ git submodule update --init

Then I tried the GUI: $ ./topographica -g examples/tiny.ty

This results in a topoconsole that's not expanded. I noticed that starting tkinter's mainloop causes the topoconsole to start working normally: topo_t000000.00_c1>>> topo.guimain.mainloop() but of course that's not the solution, because then you can't use the console any more.

ceball commented 9 years ago

By the way, I just followed the README's clone instructions (except for using https) and git describe gives me CNV-2014-701-g1c6dc94.

ceball commented 9 years ago

Also, ./topographica --version reports 0.9.8 for this copy, which doesn't seem right to me. I'm getting confused, because I thought we sorted this stuff out a few months ago. Or was that only in param?

jlstevens commented 9 years ago

Honestly, I have no idea what you are talking about!

./topographica --version
Usage: topographica ([<option>]:[<filename>])*
where any combination of options and Python script filenames will be
processed in order left to right.

topographica: error: no such option: --version

This is because --version doesn't exist (and never has afaik):

EDIT: I skimmed the above and missed the fact that Jim has just added this feature!

./topographica --help
Usage: topographica ([<option>]:[<filename>])*
where any combination of options and Python script filenames will be
processed in order left to right.

Options:
  -h, --help            show this help message and exit
  -i, --interactive     provide an interactive prompt even if stdin does not
                        appear to be a terminal.
  -v, --verbose         enable verbose messaging output
  -d, --debug           enable debugging message output (implies --verbose)
  -l, --legacy          launch Topographica with legacy support enabled
  -o "<output-path>", --outputpath="<output-path>"
                        set the default output path
  -g, --gui             launch an interactive graphical user interface;
                        equivalent to -c 'from topo.misc.commandline import
                        gui ; gui()'. Implies -a.
  --pdb                 Automatically call the pdb debugger after every
                        uncaught exception. See IPython documentation for
                        further details.
  -c "<command>", --command="<command>"
                        string of arbitrary Python code to be executed in the
                        main namespace
  --ip=IP               Store the provided notebook IP.
  --port=PORT           Store the provided notebook port.
  -n, --notebook        launch the IPython Notebook interface
  -p <param>=<value>, --set-parameter=<param>=<value>
                        command specifying value(s) of script-level (global)
                        Parameter(s).
  -a, --auto-import-commands
                        import everything from commands/*.py into the main
                        namespace, for convenience; equivalent to -c 'from
                        topo.misc.commandline import auto_import_commands ;
                        auto_import_commands()'.
  -t <testname>, --test=<testname>
                        name of test to run (use '-t list' to show tests
                        available).

But __version__ works correctly as expected:

>>>  import topo
>>> topo.__version__
Version((0, 9, 8),'/user/home/topographica/topo/__init__.pyc','6112f71')

What is the particularly concern with versioning right now?

jlstevens commented 9 years ago

By the way, I just followed the README's clone instructions (except for using https) and git describe gives me CNV-2014-701-g1c6dc94.

That is correct. The tag 'CNV' doesn't follow the convention for versioning e.g. v0.9.7 or v0.9.8. The latter is the current version.

philippjfr commented 9 years ago

I've known about the GUI issue for a while but until recently it only occurred on one of my 3 machines. I vaguely remember it having something to do with the interaction between Tk and matplotlib but I might be completely wrong. I looked into it again when Jan reported having this issue but haven't made any progress. Will have another look now.

ceball commented 9 years ago

@philippjfr: anything like this could also be related to ancient tk hacks that originated from me, so if you determine what change caused the problem but it doesn't make any sense to you, let me know.

@jlstevens: you missed Jim's commit adding --version. However, I missed his demo showing --version correctly reporting git information (the github interface hides his example from me by default). So I'll have to investigate why on the copy I was using I don't get that git information.

ceball commented 9 years ago

So is my problem with --version that the most recent git tag doesn't match the convention we expect?

$ git describe
CNV-2014-701-g1c6dc94

Meaning I don't get git information in __version__?

>>> import topo; topo.__version__
Version((0, 9, 8),'/home/ceball/tmp/topographica/topo/__init__.pyc',None)

How come that doesn't happen for you and Jim? (This is on a fresh clone.)

philippjfr commented 9 years ago

Managed to fix this issue by creating a matplotlibrc file setting the backend to agg like this:

backend: agg

I'm still getting some issues with Pillow on this machine so I can't test everything else works. However based on this fix I'm almost certain this is a weird interaction between holoviews and the GUI. Importing matplotlib in holoviews is probably occurring before the GUI is launched and selecting tkagg as a backend, causing issues during creation of TopoConsole. The agg backend is generally the most stable for us, so as long as we confirm that curves and other legacy pylabplots still work from the GUI we should strongly recommend that the agg backend is selected.

jlstevens commented 9 years ago

Show me the output of git tag. The tags with versions should be there.

Obviously, we aren't going to use any arbitrary git tag, no matter how recent. It doesn't matter what the last tag is set to unless it follows the appropriate convention for version format (in which case it will be used).

The Version class really isn't that hard to understand and it is very well documented. In particular, the git_fetch method isn't working for you, even though it is trying to run git.exe and git.cmd (for Windows users).

This should take you less than five minutes to figure out. We can fix Version class if we think you are being affected by a problem that might impact on other people as well.

ceball commented 9 years ago

output of git tag:

CNV-2014
GCALModelDB
v0.9.7
v0.9.8

This should take you less than five minutes to figure out.

Ok, you've sold me - I'll investigate...but only because my viva's been cancelled (was tomorrow)!

if we think you are being affected by a problem that might impact on other people as well.

It's happening with fresh clones on Ubuntu 12 and DICE, so I'd be surprised if it's not affecting other people too - but it's possible (particularly since it's not easy to get current topographica running on either of those platforms at the moment...).

jbednar commented 9 years ago

Ah, I see what the confusion was. Git describe does indeed use CNV-2014, because that's the last tag, but __version__ doesn't, and therefore neither does my new --version option:

novo:~/research/topographica> git describe CNV-2014-701-g1c6dc94 novo:~/research/topographica> ./topographica --version 0.9.8-1343-g1c6dc94

So Chris and I are both using the same version, and he's getting GUI problems and I am not (this version works fine for me). He also seems to be having problems with getting the right information from __version__.

philippjfr commented 9 years ago

Could we move discussion of the versioning stuff somewhere else if there's anything more to discuss? @ceball: Does setting the backend to agg fix your GUI issues?

ceball commented 9 years ago

Yes, doing backend: agg in matplotlibrc in the current (i.e. topographica) directory fixes my GUI issue.

ceball commented 9 years ago

(Although of course now matplotlib plots don't display for me in the GUI.)

jlstevens commented 9 years ago

Great!

We've had a lot of problems fighting matplotlib backends. I wouldn't be against adding such a matplotlibrc file by default to topographica. We always want to use the Agg backend really...

Hopefully we can decide whether we want to include this file then close this issue. Unfortunately, it seems another matpotlib issue has cropped up while typing this. :-(

philippjfr commented 9 years ago

Hmm, yea it's not surprising that the Tk GUI can't display matplotlib windows if the backend is set to agg. Just found a fix though, in topo/misc/commandline.py the backend is currently set by setting the rcParams. If I replace those settings with plt.switch_backend('agg') on line 29 and plt.switch_backend('TkAgg') on line 460, everything seems to work fine. @ceball: Could you confirm this and if it works for you I'll commit it.

ceball commented 9 years ago

We always want to use the Agg backend really...

Except for with the tk gui, right? Or am I confused?

I moved the version stuff to https://github.com/ioam/param/issues/70 and will deal with that myself.

ceball commented 9 years ago

Ah, saw Philipp's message after I'd written mine.

Yes, with the previously mentioned matplotlibrc file and the matplotlib.pyplot.switch_backend() calls as above (rather than manipulating rcParams), the topoconsole expands as normal and I get matplotlib plots displaying as normal.

philippjfr commented 9 years ago

Except for with the tk gui, right? Or am I confused?

No that's correct, the GUI will have to use TkAgg for obvious reasons but we can enforce that using the plt.switch_backend('TkAgg)call in the commandline GUI setup. So we should really strongly recommend thebackend: agg` setting somewhere. All our notebook tests are only guaranteed to work with the 'agg' backend, as we've experienced some instability when using anything else.

@ceball: Great, if there's no objections I'll replace the previous rcParam based backend settings with the call to plt.switch_backend. Then we'll just have to add a strong recommendation to select backend: agg in the matplotlibrc. Alternatively we could enforce it by adding matplotlib.use('agg') to topo/__init__.py or possibly even the topographica script (which is where holoviews and therefore pyplot is first imported).

jlstevens commented 9 years ago

We always want to use the Agg backend really...

I said that because I never use the Tk GUI anymore (I keep forgetting it exists) and we want Agg for everything else (IPython Notebook). Philipp's suggestion of using Agg by default and switching to TkAgg when launching the TK GUI in commandline seems ideal.

@philippjfr Another post that appeared while writing this! Your suggestion seems fine - I would prefer for the code approach instead of a matplotlibrc file myself...

philippjfr commented 9 years ago

@jlstevens I agree, only mentioned the matplotlibrc because I only figured out the matplotlib.use thing halfway through my post and haven't tested it yet. For some reason it now works on my machine whether or not backend: 'agg' is set.

jbednar commented 9 years ago

Just to catch myself up to date -- I strongly argue against any solution based on matplotlibrc; Topographica should not be recommending that people mess with that, should not be depending on what is in that file, and should not be changing that file itself. Topographica, as a full standalone application that uses matplotlib internally, should be setting the backend as necessary for its own use (just as suggested by Philipp), and otherwise not mess with anything or depend on anything.

What holoviews should do is less clear, because it's a library rather than an application, and needs to fit into multiple possible workflows. But having it use Agg internally seems fine, as long as Topographica can switch the backend to TkAgg as needed.

We've been dealing with matplotlib backend issues for so many years that I can't bear to work on those again, but it seems like we have to. :-(

philippjfr commented 9 years ago

Okay my concrete suggestions are as follows:

1) Change the setting of rcParams in topo/misc/commandline.py to plt.switch_backend('TkAgg'), that may be all that's required. I'll make that change right now. 2) If necessary, i.e. if @ceball or @antolikjan still have issues, I'll also commit something initially setting the backend to 'agg'.

jbednar commented 9 years ago

Sounds good. @ceball and @antolikjan, please check that it works ok after Philipp's change, and everyone else can check that notebooks, etc. work as desired.

antolikjan commented 9 years ago

Hello everybody,

just an update on the current situation. I just did a completely fresh install of Ubuntu 14. I installed the ubuntu tk and pil packages. Under this installation method I do not get anymore the problems with the GUI. Unfortunately I now get this other bug which I remember seeing once very long time ago, but I cannot remember how it was resolved. I am attaching it below in case somebody has seen that recently.

I also tried to install topographica within a virtualenv, with all the related packages installed from pip instead. This unfortunately did not worked (yet) as I cannot make PIL recognize tkinter - it complains that the tcl/tk libraries are not installed on the system even though they were.

Best, Jan

The current bug:

WARNING:root:Time: 000002.05 TopoConsole00345: (AttributeError) cos Traceback (most recent call last): File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1489, in call return self.func(_args) File "/home/jan/projects/topographica-new/topo/tkgui/topoconsole.py", line 735, in run_simulation topo.sim.run_and_time(fduration) File "/home/jan/projects/topographica-new/topo/base/simulation.py", line 1235, in run_and_time self.timer.call_and_time(duration) File "/home/jan/projects/topographica-new/topo/base/simulation.py", line 740, in call_and_time self.measure(fduration,step) File "/home/jan/projects/topographica-new/topo/base/simulation.py", line 692, in __measure self.func(arg_list[i]) File "/home/jan/projects/topographica-new/topo/base/simulation.py", line 1347, in run event(self) File "/home/jan/projects/topographica-new/topo/base/simulation.py", line 522, in __call self.fn(_self.args,_self.kw) File "/home/jan/projects/topographica-new/topo/base/generatorsheet.py", line 104, in generate ac = self.input_generator() File "./contrib/complex_cell_lissom.ty", line 145, in call return generator(xdensity=xdensity, ydensity=ydensity, bounds=bounds, x=self.x + self.jitter_magnitude * self.r(), y=self.y + self.jitter_magnitude * self.r(), orientation=self.inspect_value("orientation"), index=self.inspect_value("index")) File "/home/jan/projects/topographica-new/external/imagen/imagen/patterngenerator.py", line 148, in call self._setup_xy(p.bounds,p.xdensity,p.ydensity,p.x,p.y,p.orientation) File "/home/jan/projects/topographica-new/external/imagen/imagen/patterngenerator.py", line 211, in _setup_xy self.pattern_x, self.pattern_y = self._create_and_rotate_coordinate_arrays(x_points-x,y_points-y,orientation) File "/home/jan/projects/topographica-new/external/imagen/imagen/patterngenerator.py", line 238, in _create_and_rotate_coordinate_arrays pattern_y = np.subtract.outer(np.cos(orientation)_y, np.sin(orientation)x) AttributeError: cos

On Tue, Dec 9, 2014 at 3:50 AM, James A. Bednar notifications@github.com wrote:

Sounds good. @ceball https://github.com/ceball and @antolikjan https://github.com/antolikjan, please check that it works ok after Philipp's change, and everyone else can check that notebooks, etc. work as desired.

— Reply to this email directly or view it on GitHub https://github.com/ioam/topographica/issues/611#issuecomment-66227066.

jlstevens commented 9 years ago

@antolikjan Are you using the --system-site-packages option when creating your virtualenv? Something like:

virtualenv --system-site-packages topo

As I use virtualenvwrapper, I be would using something like this instead:

mkvirtualenv --system-site-packages topo

This should expose all the functionality available on your system by default while also giving you control over where any new packages go. In addition, you can shadow the system packages with different versions if you need.

ceball commented 9 years ago

Just an update: I've tried the latest version, but the topoconsole doesn't expand. However, if I have the matplotlibrc file (backend: agg) from earlier, the topoconsole does expand.

ceball commented 9 years ago

I've moved Jan's problem to #613. Good luck over there Jan :)

ceball commented 9 years ago

If I don't have the matplotlibrc, the topoconsole doesn't expand, as I said. If I put a matplotlib.use('Agg') at the start of the topographica script, the topoconsole does expand. If I instead put plt.switch_backend('Agg)at the start of the topographica script, the topoconsole does not expand. If I putmatplotlib.use('Agg')instead ofplt.switch_backend('Agg')` in topo/misc/commandline.py, the topoconsole does not expand.

ceball commented 9 years ago

Sorry, I'm catching up here. Is the difference in behavior we're seeing (topoconsole expands for some, not for others) down to different binary distributions of matplotlib having different default backends (as chosen by whoever made the binary)? Where topoconsole expands, maybe agg is already the default backend, and where topoconsole does not expand, maybe agg is not the default backend?

Anyway, I found that the latest I can put matplotlib.use('Agg') is the line before external/imagen/imagen/patterngenerator.py's from holoviews import ViewMap, Matrix. I think that's where holoviews is first imported by topographica. (I'm not suggesting this as the solution, of course.)

ceball commented 9 years ago

Just a note that on this copy of python (anaconda python) where the topoconsole doesn't expand (without one of the workarounds above), if I start python and do matplotlib.get_backend(), I get Qt4Agg.

ceball commented 9 years ago

Sorry to keep posting - I keep thinking I've stopped working on this! switch_backend is 'experimental' according to http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.switch_backend. That docstring also says: If you try to interactively switch from one GUI backend to another, you will explode.

ceball commented 9 years ago

Where topoconsole expands, maybe agg is already the default backend,

Or tkagg, of course.

ceball commented 9 years ago

With the current git topographica, the topoconsole also does not expand on doozy (ubuntu 14.04, using the system python). The default backend there seems to be Qt4Agg too.

On hebb, which is the machine with dice-pyenv CNV available (the only DICE machine where you can run topographica at all?), I get ImportError: cannot import name _tkagg when I run ./topographica -g.

ceball commented 9 years ago

Ok, I promise I've finished reporting stuff now. I could actually attempt to fix the problem, but not until the middle of next week or so.

For Topographica, I think matplotlib's backend has to be set to a non-gui one (i.e. agg for us) using matplotlib.use('Agg') (or possibly whatever we were previously doing - rcparams?) before importing matplotlib (or more specifically, matplotlib.pyplot or matplotlib.pylab - I think, according to http://matplotlib.org/faq/usage_faq.html#what-is-a-backend). Otherwise, if people have a version of matplotlib where the default backend is a gui one, but is not tkagg (at least Ubuntu 14 and Anaconda python?), the gui won't work (given what the docstring of switch_backend() says about switching gui backends not working).

In topo/__init__.py, import imagen is I think what results in matplotlib (pylab/pyplot?) being imported (via holoviews) before any code in topo/misc/commandline.py that might try to set the backend can have any effect.

philippjfr commented 9 years ago

Thanks for looking into this Chris. I did think it was likely to still be broken without adding matplotlib.use('agg') somewhere but it seemed to be working without it on my machine for some reason. My suggestion would be to stick the matplotlib.use('agg') either in the topographica script or in topo/__init__.py. Which one would you prefer?

philippjfr commented 9 years ago

I've just been thinking. The real cause of this is that when importing holoviews the ipython extension and plotting code are automatically imported and both initialize pyplot. Elsewhere we have been discussing supporting different levels of dependencies, in particular to ensure we don't require matplotlib. Implementing that should be enough to address this issue.

ceball commented 9 years ago

it seemed to be working without it on my machine for some reason

Maybe your matplotlib has a non-gui or tkagg default backend?

The reason I didn't just commit a change like putting matplotlib.use('agg') into topo/__init__.py before import imagen is that I'd first like to see if it's possible to avoid importing imagen in topo/__init__.py (delaying its import until later, or avoiding it altogether). But I'd need to study the file (and topo/misc/commandline.py) to decide that, and I'm also not clear on the dependencies (since I haven't been following development for a while). Ignoring tkgui, the situation I have in my head right now (which is probably wrong) is that topographica depends on imagen and holoviews, imagen depends on holoviews, and holoviews depends on matplotlib's pyplot and/or pylab...and therefore topographica and imagen also depend on matplotlib's pyplot and/or pylab i.e. matplotlib is no longer optional.

ceball commented 9 years ago

Philipp, I've just seen your post after submitting mine. (Github needs a conversation update notification like gmail's...) I was wondering if the dependencies were intentional or not - now I know you're discussing the dependencies, I see it makes sense to leave this issue until that's been done. Thanks!

jbednar commented 9 years ago

It sounds like this is coming to some sort of a conclusion. I agree, Topographica and its tkgui should not require Matplotlib just to load, and preferably should not be loading it unless it is actually about to be used (in a tkgui plot or in an IPython notebook). We don't want to have to debug anything to do with Matplotlib or its backends on any system, unless we are actually using Matplotlib.

So, yes, Philipp, please do make holoviews not require Matplotlib in its core, and please make Imagen rely only on the core of holoviews, not anything to do with plotting. That should be a big help in eliminating problems like this. And it sounds like it should fix this specific issue of having tkgui problems that vary by system.

That said, I'm not sure it's enough to fix everything -- won't we still need to specify Agg somewhere for when tkgui is not in use? I guess that you can do that in the non-core parts of holoviews, so that if anyone imports those, Matplotlib will use an Agg backend, if anyone runs the tkgui it will use a TkAgg backend, and otherwise won't be loaded at all? Somehow we still do need an Agg backend for run_batch, right, which is neither of these cases?

mjabri commented 8 years ago

I am not sure where this issue's conclusion was at, but i just want to note that with latest topographica on github as on yesterday 17 Oct 2015:

  1. A "backend: agg" in matplotlibrc is necessary for the GUI to expand.
  2. If you do 1., then matplotlib plots no longer show up when plotted from the topographica prompt.
philippjfr commented 8 years ago

Just pushed a fix for this along with a fix for the projections in the GUI. Could you pull the latest version of Topographica along with the submodules and report back?

mjabri commented 8 years ago

Thanks Philipp. I just pulled a fresh clone. Plotting is ok now, but i still get key error when i try to plot projections (e.g. ./topographica -g ./examples/gcal.ty). Here the trace when i tried to plot LGN and V1 projections.

[143][marwan@synapse:topographica]> ./topographica -g ./examples/gcal.ty Launching GUI Output path: /home/marwan/Documents/Topographica

Welcome to Topographica!

Type help() for interactive help with python, help(topo) for general information about Topographica, help(commandname) for info on a specific command, or topo.about() for info on this release, including licensing information.

topo_t000000.00_c1>>> WARNING:root:Time: 000001.00 TopoConsole01074: (KeyError) 'Afferent' Traceback (most recent call last): File "/opt/anaconda/lib/python2.7/lib-tk/Tkinter.py", line 1536, in **call** return self.func(_args) File "/opt-local/git-topographica/latest/topographica/external/paramtk/paramtk/**init**.py", line 671, in tkvar.trace_variable('w',lambda a,b,c,p_name=name: self._handle_gui_set(p_name)) File "/opt-local/git-topographica/latest/topographica/external/paramtk/paramtk/__init__.py", line 1339, in _handle_gui_set self._update_param_from_tkvar(p_name,force) File "/opt-local/git-topographica/latest/topographica/external/paramtk/paramtk/__init__.py", line 1332, in _update_param_from_tkvar super(TkParameterized,self)._update_param_from_tkvar(param_name) File "/opt-local/git-topographica/latest/topographica/external/paramtk/paramtk/__init__.py", line 798, in _update_param_from_tkvar tkvar._on_modify() File "/opt-local/git-topographica/latest/topographica/topo/tkgui/plotgrouppanel.py", line 40, in busy_fn fn(widget,_args,**kw) File "/opt-local/git-topographica/latest/topographica/topo/tkgui/plotgrouppanel.py", line 428, in redraw_plots self.plotgroup.make_plots(update=False) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 113, in make_plots self._create_images(update) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 163, in _create_images self.plots = [plot for plot in self._generate_plots() if plot is not None] File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 582, in _generate_plots return self._static_plots[:]+self._template_plots(range_=range_) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 795, in _template_plots return super(ProjectionSheetPlotGroup,self)._template_plots(range_=named_ranges) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 633, in _template_plots template_plots.append(self._make_template_plot(plot_template_name,plot_template,**kw)) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 1169, in _make_template_plot view_dict = {'Strength': kw['proj'].dest.views.CFs[kw['proj'].name], File "/opt-local/git-topographica/latest/topographica/external/holoviews/holoviews/core/layout.py", line 493, in __getitem__ return super(Layout, self).**getitem**(key) File "/opt-local/git-topographica/latest/topographica/external/holoviews/holoviews/core/tree.py", line 171, in **getitem** raise KeyError(identifier) KeyError: 'Afferent' WARNING:root:Time: 000001.00 TopoConsole01074: (KeyError) 'LGNOnAfferent' Traceback (most recent call last): File "/opt/anaconda/lib/python2.7/lib-tk/Tkinter.py", line 1536, in **call** return self.func(_args) File "/opt-local/git-topographica/latest/topographica/external/paramtk/paramtk/**init**.py", line 671, in tkvar.trace_variable('w',lambda a,b,c,p_name=name: self._handle_gui_set(p_name)) File "/opt-local/git-topographica/latest/topographica/external/paramtk/paramtk/__init__.py", line 1339, in _handle_gui_set self._update_param_from_tkvar(p_name,force) File "/opt-local/git-topographica/latest/topographica/external/paramtk/paramtk/__init__.py", line 1332, in _update_param_from_tkvar super(TkParameterized,self)._update_param_from_tkvar(param_name) File "/opt-local/git-topographica/latest/topographica/external/paramtk/paramtk/__init__.py", line 798, in _update_param_from_tkvar tkvar._on_modify() File "/opt-local/git-topographica/latest/topographica/topo/tkgui/projectionpanel.py", line 289, in sheet_change super(ProjectionPanel,self).sheet_change() File "/opt-local/git-topographica/latest/topographica/topo/tkgui/projectionpanel.py", line 195, in sheet_change self.redraw_plots() File "/opt-local/git-topographica/latest/topographica/topo/tkgui/plotgrouppanel.py", line 40, in busy_fn fn(widget,_args,**kw) File "/opt-local/git-topographica/latest/topographica/topo/tkgui/plotgrouppanel.py", line 428, in redraw_plots self.plotgroup.make_plots(update=False) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 113, in make_plots self._create_images(update) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 163, in _create_images self.plots = [plot for plot in self._generate_plots() if plot is not None] File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 582, in _generate_plots return self._static_plots[:]+self._template_plots(range_=range_) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 795, in _template_plots return super(ProjectionSheetPlotGroup,self)._template_plots(range_=named_ranges) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 633, in _template_plots template_plots.append(self._make_template_plot(plot_template_name,plot_template,**kw)) File "/opt-local/git-topographica/latest/topographica/topo/plotting/plotgroup.py", line 1169, in _make_template_plot view_dict = {'Strength': kw['proj'].dest.views.CFs[kw['proj'].name], File "/opt-local/git-topographica/latest/topographica/external/holoviews/holoviews/core/layout.py", line 493, in __getitem__ return super(Layout, self).**getitem**(key) File "/opt-local/git-topographica/latest/topographica/external/holoviews/holoviews/core/tree.py", line 171, in **getitem** raise KeyError(identifier) KeyError: 'LGNOnAfferent'
philippjfr commented 8 years ago

Seems like I can reproduce it now at least. Seems to work fine for tiny.ty but not for gcal.ty. Hopefully I'll have a fix soon.

mjabri commented 8 years ago

Great, that helps :)