Must declare a nengo.Network called "model"

Hi i am a graduate in China.
why ? the nengo-gui says
must declare a nengo.Network called “model”
to me ,when i write the same codes of the example of Integrator — Nengo 3.1.0 docs ?
for example :

integrator = nengo.networks.Integrator(tau, n_neurons=100, dimensions=1)
with integrator:
    input = nengo.Node(Piecewise({0: 0, 0.2: 1, 1: 0, 2: -2, 3: 0, 4: 1, 5: 0}))

but get errors with no called models .
it is may a stupid question.
may be the rule changed in v3.1?

Hi @IM1st, and welcome to the Nengo forums! :smiley:

The error you are getting (“Must declare a nengo.Network called “model””) is only applicable to the NengoGUI. In the NengoGUI, all models defined must have base model called model. The example you linked is meant to be run either as a Jupyter notebook, or as standalone code (i.e., in a separate python file). Running a Nengo model in either of these two modes do not have the “model” name restriction.

The neural integrator example you linked actually has a NengoGUI counterpart. You can find it in NengoGUI under Open Filebuild-in