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

🐛 pros upload crashes without helpful error when --slot is not given #336

Closed
zabackary opened this issue Feb 19, 2024 · 1 comment
Closed

Comments

@zabackary
Copy link

Describe the bug
pros upload crashes when a slot is missing instead of emitting an error.

To Reproduce

  1. Run `pros upload --target v5 {path to file}"
  2. pros crashes with "unsupported operand type" since the slot is a NoneType (i.e., undefined/None)

Expected behavior
PROS outputs an error similar to the text "Specify a slot to upload to."

Screenshots

$ pros upload --target v5 /dev/null
ERROR - __main__:main - unsupported operand type(s) for -=: 'NoneType' and 'int' - pros-cli version:3.5.0
  File "click\core.py", line 783, in invoke
  File "pros\cli\upload.py", line 121, in upload
TypeError: unsupported operand type(s) for -=: 'NoneType' and 'int'

Here's the permalink to the line in question:

kwargs['slot'] -= 1

PROS version:
3.5.0

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 22H2 (OS build 19045.4046)

Other context:
I'm trying out pros-rs (Rust bindings to the PROS libraries) to generate the binary, but that probably doesn't matter.

I'm new to PROS and my team likely won't let me switch because I just convinced them this year to use VEXCode Python since CPP is a little tricky for beginners, but if you would like, I can submit a PR sometime next weekend.

@zabackary
Copy link
Author

Oops, just realized this is a duplicate of #245. Sorry for the noise.

@zabackary zabackary closed this as not planned Won't fix, can't repro, duplicate, stale Feb 19, 2024
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