Skip to content

CircuitPython Error on Catalina -- "Port must be configured before it can be used" #24

@txoof

Description

@txoof
  • CircuitPython Kernel version: 7.19.0
  • Python version: 3.8.6
  • Operating System: Mac OS Catalina 10.15.7
  • Board-ID: SAMD51G19A-Itsy-v0
  • Board boot_out.txt: Adafruit CircuitPython 6.0.1 on 2020-12-28; Adafruit ItsyBitsy M4 Express with samd51g19
  • UF2 Bootloader v3.10.0 SFHWRO

Description

When following the Adafruit Jupyter Circuit Python Guide, Jupyter fails to connect to the kernel/board with the error Port must be configured before it can be used displayed in the terminal

What I Did

  • cloned this repository
  • ran:
         $ python3 setup.py install
         $ cd circuitpython_kernel
         $ python3 -m circuitpython_kernel.install
    
  • Board is connected via known-good USB cable
  • Board neo-pixel is blinking green
  • Board appears as USB Drive "CIRCUITPY" in finder

Trouble Shooting Attempts:

Attempt: Restart Jupyter

  • Result:
    - Jupyter output: A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connection or notebook server configuration.
    - Terminal Output: (repeats 5 times)
[I 11:09:50.381 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
Traceback (most recent call last):
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/circuitpython_kernel/__main__.py", line 4, in <module>
    IPKernelApp.launch_instance(kernel_class=CircuitPyKernel)
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/traitlets/config/application.py", line 844, in launch_instance
    app.initialize(argv)
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/traitlets/config/application.py", line 87, in inner
    return method(app, *args, **kwargs)
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/ipykernel/kernelapp.py", line 582, in initialize
    self.init_kernel()
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/ipykernel/kernelapp.py", line 444, in init_kernel
    kernel = kernel_factory(parent=self, session=self.session,
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/traitlets/config/configurable.py", line 537, in instance
    inst = cls(*args, **kwargs)
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/circuitpython_kernel/kernel.py", line 37, in __init__
    self.serial = connect()
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/circuitpython_kernel/board.py", line 58, in connect
    s.open()
  File "/Users/aaronciuffo/.pyenv/versions/3.8.6/Python.framework/Versions/3.8/lib/python3.8/site-packages/serial/serialposix.py", line 316, in open
    raise SerialException("Port must be configured before it can be used.")
serial.serialutil.SerialException: Port must be configured before it can be used.
... Repeats 5 times ...
[W 11:15:48.289 NotebookApp] KernelRestarter: restart failed
[W 11:15:48.289 NotebookApp] Kernel 3c7b0cdf-538d-481c-b159-7fa42722b61b died, removing from map.

Attempt: Reset M4 Board and restart kernel

  • Result: Same as above

Attempt: Reset unplug board and restart kernel

  • Result: Same as above

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions