Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update command only partially working for local path instead of device #220

Open
FoamyGuy opened this issue May 20, 2024 · 1 comment
Open

Comments

@FoamyGuy
Copy link
Contributor

Technically the combination of --path, --cpy-version, and --board-id should allow any of the other commands to run targeting a local directory (without a boot_out.txt file) instead of a physical device.

However the update command currently raises an error if you attempt to use it with these arguments.

$ circup --path fake_project/ --cpy-version 8.0.0 --board-id fake update
Found device at fake_project/, running CircuitPython 8.0.0.
A newer version of CircuitPython (9.0.4) is available.
Get it here: https://circuitpython.org/board/fake
Traceback (most recent call last):
  File "/home/timc/.local/bin/circup", line 33, in <module>
    sys.exit(load_entry_point('circup', 'console_scripts', 'circup')())
  File "/home/timc/.local/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/timc/.local/lib/python3.10/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/timc/.local/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/timc/.local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/timc/.local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/timc/.local/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/timc/repos/circuitpython/circup/circup/commands.py", line 493, in update
    modules_to_update = [m for m in installed_modules if m.outofdate]
  File "/home/timc/repos/circuitpython/circup/circup/commands.py", line 493, in <listcomp>
    modules_to_update = [m for m in installed_modules if m.outofdate]
  File "/home/timc/repos/circuitpython/circup/circup/module.py", line 108, in outofdate
    if self.mpy_mismatch:
  File "/home/timc/repos/circuitpython/circup/circup/module.py", line 142, in mpy_mismatch
    if self.min_version and cpv < VersionInfo.parse(self.min_version):
UnboundLocalError: local variable 'cpv' referenced before assignment
@FoamyGuy
Copy link
Contributor Author

the circup list command reports the same error as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant