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

Command platformio package unpublish crashes #3660

Closed
Erriez opened this issue Sep 8, 2020 · 0 comments
Closed

Command platformio package unpublish crashes #3660

Erriez opened this issue Sep 8, 2020 · 0 comments
Assignees
Milestone

Comments

@Erriez
Copy link

Erriez commented Sep 8, 2020

  • [X ] PlatformIO Core.
    If you’ve found a bug, please provide an information below.

Configuration

Operating system: Ubuntu 18.04

PlatformIO Version (platformio --version): 5.0.0

Description of problem

The command below crashes:

platformio package unpublish [email protected]

Steps to Reproduce

  1. Run the command above

Actual Results

Error: Traceback (most recent call last):
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/platformio/__main__.py", line 109, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/platformio/commands/__init__.py", line 44, in invoke
    return super(PlatformioCLI, self).invoke(ctx)
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/platformio/commands/package.py", line 111, in package_unpublish
    undo=undo,
  File "/home/erwin/.platformio/penv/lib/python3.6/site-packages/platformio/clients/registry.py", line 72, in unpublish_package
    path += "/" + string(version)
NameError: name 'string' is not defined

Expected Results

Package version has been successfully removed from the registry


### Additional info

Possible fix in `~/.platformio/penv/lib/python3.6/site-packages/platformio/clients/registry.py` line 71:

Change `path += "/" + version` to: `path += "/" + str(version)`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants