First tutorial does not work on clean install


#1

I tried to run the first of htbab_tutorials but it failed with the following error that was repeated again and again until the page became unresponsive:

Error during websocket communication.
Traceback (most recent call last):
  File "C:\Users\evgenii\Miniconda2\envs\nengo\lib\site-packages\nengo_gui\guibackend.py", line 230, in ws_default
    component.update_client(self.ws)
  File "C:\Users\evgenii\Miniconda2\envs\nengo\lib\site-packages\nengo_gui\components\netgraph.py", line 389, in update_client
    self.send_pan_and_zoom(client)
  File "C:\Users\evgenii\Miniconda2\envs\nengo\lib\site-packages\nengo_gui\components\netgraph.py", line 572, in send_pan_and_zoom
    pan = self.page.config[self.page.model].pos
  File "C:\Users\evgenii\Miniconda2\envs\nengo\lib\site-packages\nengo\config.py", line 362, in __getitem__
    "configures('%(name)s') first." % {'name': type(key).__name__})
nengo.exceptions.ConfigError: Type 'NoneType' is not set up for configuration. Call configures('NoneType') first.

I am on Win 7 x64, using Chrome. I am using Avast anti-virus software which I tried disabling but it did not help.

The conda environment was created like this:

conda create -n nengo python=3 numpy
activate nengo
pip install nengo nengo-gui
conda install jupyter
conda install matplotlib

Do you know what is causing the error(s) and how I could fix it?


#2

The tutorials in nengo-examples are designed to be run from a Jupyter notebook. To open them, at the command prompt type

jupyter notebook

Then navigate to the folder with those examples and open them there.

The How to Build a Brain Tutorials are also part of the Nengo GUI, but in a separate location. To open them from the GUI, click on the folder icon in the top left, then built-in examples, then hbb_tutorials. I just confirmed that using the Conda environment you described, I was able to open the first tutorial this way and it ran correctly.

Let me know if any of these steps are unclear!


#3

Sorry, I missed a step explaining what I did.

I did run the tutorial as a Jupyter notebook. When I got to this part:

IPythonViz(model, "ch1-singleneuron.py.cfg")

I got the error mentioned in the original post. And that error repeated on and on until the tab became unresponsive.


#4

I got a different error on Windows 10 with the Nengo GUI master, so further investigation is needed.

As a work-around, you can run nengo and then copy the model code into the instance. Additionally, if you click the folder icon in a Nengo GUI instance launched with nengo, under built-in examples there are the “How to Build a Brain” tutorials which did work for me.


#5

Using GUI does work but I believe it would be better to make it work in the Jupyter notebook. Does anyone have an I idea what I can try to do?

I tried to do the same sequence of steps on three different computers (all win7 x64 though) and got the same mistake. Could anyone on Win7 try to reproduce the error?


#6

None of the computers in our lab run Windows 7. At the risk of being unhelpful, do you know upgrading to Windows 10 is still free? I’m sure you have your reasons for staying on Windows 7, but I wanted to make sure cost wasn’t one of them. If you have Windows 10, you can run Ubuntu on the Windows subsystem and this bug might go away.

Another option is installing nengo-gui master from GitHub by running the command pip install -e git+https://github.com/nengo/nengo-gui.git#egg=nengo-gui. I’m not sure if this will fix it, but I think it’s worth trying.


#7

I think it is pretty unlikely that upgrading to Windows 10 will fix this issue.


#8

After some further investigation, it appears the last time Jupyter Notebook worked as expected with the Nengo GUI, was commit 41dc4a7. You can install this specific commit with pip install -e git+https://github.com/nengo/nengo-gui.git@41dc4a7#egg=nengo-gui.


#9

Thank you for the suggestions.

Upgrading to Windows 10 is not free anymore and there are other reasons for which I don’t want to upgrade on existing computers.

I am going to try a computer with Ubuntu and also going to try the commit you mentioned. I will report once I have any results in case someone else has the same problem.

BTW, is there a page where one can check supported platforms and environments of Nengo? From the installation instructions it seemed that Windows + Jupyter should have been a viable combination. Is there another place I should have looked or did I miss something?


#10

All platforms that can run Python and Numpy are supported by Nengo. I was just being silly and thinking this was a corner-case unique to your platform, however there’s isn’t a lot of evidence for that. I’m still trying to figure out why exactly it didn’t work for you.


#11

Thank you very much for looking into my problem. Is there a way I can help you?


#12

Your problem might be fixed with nengo/nengo-gui#960 (branch ipythonviz-fixes). Can you try that version?


#13

Just tried branch ipythonviz-fixes. Now the tutorial runs and shows the right graphs. Thank you so much!

There is a new error however:

ERROR:nengo_gui.guibackend:Error during websocket communication.
Traceback (most recent call last):
  File "C:\Users\evgenii\Miniconda2\envs\nengo\lib\site-packages\nengo_gui\guibackend.py", line 254, in ws_default
    component.page.save_config(lazy=True)
  File "C:\Users\evgenii\Miniconda2\envs\nengo\lib\site-packages\nengo_gui\page.py", line 323, in save_config
    f.write(self.config.dumps(uids=self.default_labels))
  File "C:\Users\evgenii\Miniconda2\envs\nengo\lib\site-packages\nengo_gui\config.py", line 61, in dumps
    elif isinstance(obj, nengo_gui.components.component.Editor):
AttributeError: module 'nengo_gui.components.component' has no attribute 'Editor'

#14

Oops, that one should be fixed too now.


#15

Now there are no errors. Thank you again!