-
Couldn't load subscription status.
- Fork 601
Add import sys.exit to optimum_cli.py #2325
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
base: main
Are you sure you want to change the base?
Conversation
|
@rasapala where do you get this error ? windows ? |
|
Yes it was discovered on windows. |
|
@rasapala and why would anyone run optimum cli with no params ? 😅 |
|
I have run into the problem while checking optimum-cli installation. First command to run to check if its available in env PATH is to run optimum-cli command. Then the problem occurred. I have worked around it and checked optimum-cli -h and everyone can do that but I wanted to let you know that this scenario may happen and this is a fix for it. |
|
I just pip installed optimum in my windows env and ran optimum-cli.exe and it worked fine is this related to a specific python version ? |
|
Yes, it fails on newer python version like 3.12.10. |
|
sorry I wasn't able to reproduce.. and didn't get any errors 🤔 |
|
I think the problem occurs when you use standard Python installation procedures with python installer. |
|
hmm i wasn't able to reproduce, but was able to find references to this issue in the python org / cpython repo python/cpython#73089 what I suggest to do is to import sys and use sys.exit() in the cli tool instead of exit(), following the answer in https://stackoverflow.com/questions/19747371/python-exit-commands-why-so-many-and-when-should-each-be-used |
Add import sys.exit to optimum_cli.py.
optimum_cli.exe when run with no parameters throws error missing name: exit.