Skip to content

Error: '500' 'Expecting value: line 1 column 1 (char 0)' #148

Description

@VaidotasSm

I get error without much explanation or debug info of whats going on and what needs fixing.

Error: '500' 'Expecting value: line 1 column 1 (char 0)'

Expected Behavior

  • Some sort of useful information should be provided or more debug output e.g. printed response.
  • Maybe improve docs of how to run cloned repo locally.

Current Behavior

I get following, not very informative output:

Onelogin Username: ...
Onelogin Password: ...
Google Authenticator Token: ...
Traceback (most recent call last):
  File ".../.pyenv/versions/3.7.7/bin/onelogin-aws-login", line 10, in <module>
    sys.exit(login())
  File ".../.pyenv/versions/3.7.7/lib/python3.7/site-packages/onelogin_aws_cli/cli.py", line 57, in login
    raise e
  File ".../.pyenv/versions/3.7.7/lib/python3.7/site-packages/onelogin_aws_cli/cli.py", line 53, in login
    api.save_credentials()
  File ".../.pyenv/versions/3.7.7/lib/python3.7/site-packages/onelogin_aws_cli/__init__.py", line 180, in save_credentials
    self.assume_role()
  File ".../.pyenv/versions/3.7.7/lib/python3.7/site-packages/onelogin_aws_cli/__init__.py", line 162, in assume_role
    self.get_role()
  File ".../.pyenv/versions/3.7.7/lib/python3.7/site-packages/onelogin_aws_cli/__init__.py", line 145, in get_role
    self.get_arns()
  File ".../.pyenv/versions/3.7.7/lib/python3.7/site-packages/onelogin_aws_cli/__init__.py", line 119, in get_arns
    self.get_saml_assertion()
  File ".../.pyenv/versions/3.7.7/lib/python3.7/site-packages/onelogin_aws_cli/__init__.py", line 91, in get_saml_assertion
    self.mfa.otp
  File ".../.pyenv/versions/3.7.7/lib/python3.7/site-packages/onelogin_aws_cli/__init__.py", line 59, in check_for_errors
    desc=self.ol_client.error_description
Exception: Onelogin Error: '500' 'Expecting value: line 1 column 1 (char 0)'

Also, tried to clone and debug locally, following instructions under Developing onelogin-aws-cli, however as someone with zero Python experience I get:

python3 onelogin_aws_cli/cli.py
Traceback (most recent call last):
  File "onelogin_aws_cli/cli.py", line 8, in <module>
    from onelogin_aws_cli import DEFAULT_CONFIG_PATH, OneloginAWS
ModuleNotFoundError: No module named 'onelogin_aws_cli'

So I think a little bit more beginner friendly documentation of how to run locally should be added too.

Steps to Reproduce

  1. export ONELOGIN_AWS_CLI_DEBUG=1
  2. onelogin-aws-login

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions