Error while launching Nengo

(base) C:\Users\nikhi>nengo
Traceback (most recent call last):
  File "c:\users\nikhi\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\nikhi\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\nikhi\Anaconda3\Scripts\nengo.exe\__main__.py", line 4, in <module>
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo_gui\__init__.py", line 1, in <module>
    from .gui import GUI, InteractiveGUI
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo_gui\gui.py", line 20, in <module>
    from nengo_gui.guibackend import GuiServer
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo_gui\guibackend.py", line 26, in <module>
    import nengo_gui.page
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo_gui\page.py", line 12, in <module>
    import nengo
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\__init__.py", line 39, in <module>
    from .base import Process
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\base.py", line 7, in <module>
    from nengo.config import SupportDefaultsMixin
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\config.py", line 18, in <module>
    from nengo.params import Default, is_param, iter_params
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\params.py", line 7, in <module>
    from nengo.rc import rc
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\rc.py", line 67, in <module>
    import nengo.utils.paths
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\utils\__init__.py", line 14, in <module>
    from . import simulator
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\utils\simulator.py", line 5, in <module>
    from .stdlib import groupby
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\utils\stdlib.py", line 256, in <module>
    class Timer:
  File "c:\users\nikhi\anaconda3\lib\site-packages\nengo\utils\stdlib.py", line 283, in Timer
    TIMER = time.clock if sys.platform == "win32" else time.time
AttributeError: module 'time' has no attribute 'clock'

Any idea how do I solve this?

This is an issue with Python 3.8 compatibility. For now you can downgrade to Python 3.7. Alternatively, this has been fixed in the master branch of Nengo (3.1.0), and so you could clone and install that repo. This fix will also be released very soon (after which you could pip install the newest version of Nengo).

1 Like

Thanks. Downgrading did not work for me earlier for windows os with conda terminal. I shall try with re-installing from master branch.

(base) Nikhils-MacBook-Air:Nengo Anonymous$ nengo
Starting nengo server accessible at:
http://localhost:8080/?token=c9b071bb0c016f14a5265642795b4c407cc8432804847411
WARNING:nengo_gui.guibackend:Session peer name mismatch: fe80::1, ::1
WARNING:nengo_gui.server:Error response (403): Forbidden
Traceback (most recent call last):
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 456, in upgrade_to_ws
assert origin.netloc.lower() in valid_srv_addrs, (
AssertionError: Invalid WS origin ‘localhost:8080’, valid origins: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 410, in do_GET
self.handle_upgrade()
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 438, in handle_upgrade
self.upgrade_to_ws()
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 462, in upgrade_to_ws
raise Forbidden()
nengo_gui.server.Forbidden: Forbidden
WARNING:nengo_gui.guibackend:Session peer name mismatch: fe80::1, ::1
WARNING:nengo_gui.server:Error response (403): Forbidden
Traceback (most recent call last):
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 456, in upgrade_to_ws
assert origin.netloc.lower() in valid_srv_addrs, (
AssertionError: Invalid WS origin ‘localhost:8080’, valid origins: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 410, in do_GET
self.handle_upgrade()
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 438, in handle_upgrade
self.upgrade_to_ws()
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 462, in upgrade_to_ws
raise Forbidden()
nengo_gui.server.Forbidden: Forbidden
WARNING:nengo_gui.guibackend:Session peer name mismatch: fe80::1, ::1
WARNING:nengo_gui.server:Error response (403): Forbidden
Traceback (most recent call last):
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 456, in upgrade_to_ws
assert origin.netloc.lower() in valid_srv_addrs, (
AssertionError: Invalid WS origin ‘localhost:8080’, valid origins: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 410, in do_GET
self.handle_upgrade()
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 438, in handle_upgrade
self.upgrade_to_ws()
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 462, in upgrade_to_ws
raise Forbidden()
nengo_gui.server.Forbidden: Forbidden
WARNING:nengo_gui.guibackend:Session peer name mismatch: fe80::1, ::1
WARNING:nengo_gui.server:Error response (403): Forbidden
Traceback (most recent call last):
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 456, in upgrade_to_ws
assert origin.netloc.lower() in valid_srv_addrs, (
AssertionError: Invalid WS origin ‘localhost:8080’, valid origins: []

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 410, in do_GET
self.handle_upgrade()
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 438, in handle_upgrade
self.upgrade_to_ws()
File “/Users/Anonymous/nengo-gui/nengo_gui/server.py”, line 462, in upgrade_to_ws
raise Forbidden()
nengo_gui.server.Forbidden: Forbidden
WARNING:nengo_gui.guibackend:Session peer name mismatch: fe80::1, ::1
WARNING:nengo_gui.guibackend:Session peer name mismatch: fe80::1, ::1
WARNING:nengo_gui.guibackend:Session peer name mismatch: fe80::1, ::1

I am facing this issue. The GUI asks for refresh and then password/token.

Do you have another webservice running at port 8080? If you do, it can potentially interfere with NengoGUI’s operation. Can you try something this?

  1. Start NengoGUI with the following command line:
    nengo --no-browser --port 12121
  2. The command above will start NengoGUI without opening a web browser window, and will prompt you with a link to go to.
    E.g., http://localhost:12121/?token=b3c0165bb5325c64a847845a528c863ed41fb7f8ab1b936b
  3. Copy the link that NengoGUI provides you in the console into your web browser and see if that works.

No I didn’t open any web server at that port. Okay I shall try to do that and get back if issue is still there. Thanks.