Skip to content

Error: Invalid value for '--version': '5.9.6' is not a valid boolean. #1524

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

Closed
mchristensen76 opened this issue Jul 29, 2021 · 3 comments · Fixed by #1527
Closed

Error: Invalid value for '--version': '5.9.6' is not a valid boolean. #1524

mchristensen76 opened this issue Jul 29, 2021 · 3 comments · Fixed by #1527
Labels

Comments

@mchristensen76
Copy link

Reminder: No username or APIkeys should be added to these issues, as they are public.

Describe the bug
A clear and concise description of what the bug is. Include the command you used, make sure to include the -v flag, as that information is very helpful. Ex: slcli -v vs list

I'm building a Dockerfile using registry.access.redhat.com/ubi8/ubi and python 3.9 (i've also tried 3.8). I've installed softlayer multiple ways, all with the same results:

  1. python -m pip install softlayer
  2. python setup.py install

If I run the slcli with no options it returns the help menu, no errors. If I run the slcli -v or some of the other options, it fails with Error: Invalid value for '--version': '5.9.6' is not a valid boolean. at the bottom of the command.

I've tried installing older versions of softlayer but the same error, with the same version 5.9.6 would still show. I'm guessing because that version is considered the latest in the --version command.

Expected behavior
A clear and concise description of what you expected to happen.

The error should not appear.

Screenshots
If applicable, add screenshots to help explain your problem.

slcli -v
Usage: slcli [OPTIONS] COMMAND [ARGS]...
Try 'slcli -h' for help.

Error: Invalid value for '--version': '5.9.6' is not a valid boolean.

Version
Include the output of slcli --version

slcli --version
Current: slcli (SoftLayer Command-line) v5.9.6
Latest:  slcli (SoftLayer Command-line) v5.9.6
@allmightyspiff
Copy link
Member

allmightyspiff commented Jul 30, 2021

Thanks for reporting this, certainly seems like an odd issue.

So far I'm not able to reproduce this issue in windows 10, or Ubuntu.

image
image

I'm not really familiar with RedHat's UBI stuff, does the SLCLI have the same problem in a normal RHEL setup or do you only see this problem in the UBI image for Red Hat?

If its only an issue with UBI red hat, could you provide a simple docker file that generates the issue? If I can reproduce the issue myself I can likely fix it.

Thanks.

@mchristensen76
Copy link
Author

Hi @allmightyspiff here's an example Dockerfile:

FROM registry.access.redhat.com/ubi8/ubi as build

WORKDIR /

ENV SLCLI_VERSION=5.9.6

RUN true \
  && yum -y update \
  && yum install -y \
    git \
    nodejs \
    make gcc wget \
    # python38 python38-devel \
    python39 python39-devel \
    device-mapper-devel \
    libassuan-devel \
    gpgme-devel \
  && ln -s /usr/bin/python3 /usr/bin/python \
  && ln -s /usr/bin/pip3 /usr/bin/pip \
  && yum -y clean all \
  && rm -rf /var/cache/yum \
  && pip install --upgrade pip \
  && python -m pip install softlayer==${SLCLI_VERSION} \
  && true

ENTRYPOINT ["/bin/bash"]

Commands to run:

docker build . -t slcli_issue
docker run --rm -it slcli_issue
slcli vlan

I did notice if I change the ENV variable SLCLI_VERSION to something else it starts working. So I guess SLCLI_VERSION is a variable used by slcli?

Thanks,

Mike

@allmightyspiff
Copy link
Member

Thanks for that, looks like SLCLI_VERSION being set is causing this problem.

image

For now, calling the env variable something else would likely fix this problem, but I'll update the codebase as well to not error like this.

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

Successfully merging a pull request may close this issue.

2 participants