ctn-archive / nengo_gui_2014

HTML5 graphical interface for Nengo -- now obsolete! Please use https://github.com/nengo/nengo_gui instead
Other
6 stars 0 forks source link

manual typing results in indentation errors #70

Closed celiasmith closed 10 years ago

celiasmith commented 10 years ago

If you start with the following code, minus the line with 'b' on it, and type that line in manually, you get:

IndentationError: unindent does not match any outer indentation level

You can only make this go away by putting your cursor in front of b and deleting twice (so it goes on the 'a' line), and hitting return.

import nengo

model = nengo.Network()
with model:
    a = nengo.Ensemble(n_neurons=80, dimensions=2, label="testasdfasdfasdfasfd")
    b = nengo.Ensemble(n_neurons=10, dimensions=1)

import nengo_gui
gui = nengo_gui.Config()
gui[model].scale = 2.145446542011098
gui[model].offset = 458.69787319655416,294.9288828261817
gui[a].pos = -79.375, 5.555
gui[a].scale = 1.000
gui[b].pos = -135.614, -58.025
gui[b].scale = 1.000
tcstewar commented 10 years ago

Hmm, looks like the file somehow got tabs in it. Did you edit it with a different editor that inserts tabs?

In any case, I'll toss in a replace('\t', ' ') and that should to it....

celiasmith commented 10 years ago

Ah yes, my bad.