nengo / nengo-gui

Nengo interactive visualizer
Other
95 stars 38 forks source link

Piecewise import error #1023

Closed JadinTredup closed 4 years ago

JadinTredup commented 4 years ago

Describe the bug

When running built-in examples 1 and 3 from the Chapter 3 tutorial of How to Build a Brain, you get the error: ImportError: cannot import name 'piecewise'

To reproduce

Steps to reproduce the behavior:

  1. Open the Nengo GUI
  2. Navigate to the built-in examples folder for How to Build a Brain
  3. Go to chapter 3 and open either example 1 (Addition) or example 3 (nonlinear transformation)
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

N/A

Versions

Additional context

I believe it is supposed to be importing Nengo.processes.Piecewise

drasmuss commented 4 years ago

Hi @JadinTredup,

You mention you have Nengo core v2.8.0 installed, but I think you might actually have v3.0.0 (nengo.utils.functions.piecewise was removed in 3.0.0). So, downgrading to 2.8.0 should make the example work. But we should also update that example for 3.0.0, thanks for bringing it to our attention!

JadinTredup commented 4 years ago

My apologies, I am not sure how I missed that. Thank you!