Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config error prevents GUI from loading #900

Open
jgosmann opened this issue Jun 13, 2017 · 2 comments
Open

Config error prevents GUI from loading #900

jgosmann opened this issue Jun 13, 2017 · 2 comments
Labels

Comments

@jgosmann
Copy link
Collaborator

jgosmann commented Jun 13, 2017

I managed to write a Python file which, when opened in the GUI, will produce a blank page with this exception:

  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo_gui/server.py", line 235, in do_GET
    self.http_GET()
  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo_gui/server.py", line 251, in http_GET
    response = getattr(self, command)()
  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo_gui/guibackend.py", line 92, in auth_checked
    return fn(inst)
  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo_gui/guibackend.py", line 191, in serve_main
    page = self.server.create_page(filename, reset_cfg=reset_cfg)
  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo_gui/guibackend.py", line 390, in create_page
    reset_cfg=reset_cfg)
  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo_gui/page.py", line 110, in __init__
    self.load()
  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo_gui/page.py", line 172, in load
    self.config = self.load_config()
  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo_gui/page.py", line 287, in load_config
    config[self.model].pos = (0, 0)
  File "/home/jgosmann/.pyenv/versions/3.5.3/lib/python3.5/site-packages/nengo/config.py", line 201, in __setattr__
    % (key, type(self._configures).__name__))
nengo.exceptions.ConfigError: Cannot configure the built-in parameter 'pos' on an instance of 'Network'. Please set the attribute directly on the object.

File:

import nengo
import nengo_spa as spa

from imem.modules import GatedMemory, SimilarityThreshold

d = 64

with spa.Network() as model:
    model.vocabs.get_or_create(d).populate('Inc.unitary()')
    
    model.current = GatedMemory(d)
    model.updated = GatedMemory(d)
    nengo.Connection(
        model.current.output, model.updated.input,
        transform=model.vocabs[d]['Inc'].get_convolution_matrix())
    nengo.Connection(model.updated.output, model.current.input)
    
    model.pos = spa.State(d)
    
    model.last_stim = spa.State(d, feedback=1.)
    model.sim_th = SimilarityThreshold(d)
    nengo.Connection(model.pos.output, model.sim_th.input_a)
    nengo.Connection(model.last_stim.output, model.sim_th.input_b)
@jgosmann jgosmann added the bug label Jun 13, 2017
@jgosmann
Copy link
Collaborator Author

Note that this happens on both master and with the basic nengo_spa support (#29).

@tbekolay
Copy link
Member

I believe this occurs because of the line model.pos = spa.State(d), since pos is an attribute the Nengo GUI adds to objects; see #562 and issues linked there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants