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

TypeError when loading config from --config-file CLI option #90

Open
tbcvl opened this issue Oct 29, 2020 · 0 comments
Open

TypeError when loading config from --config-file CLI option #90

tbcvl opened this issue Oct 29, 2020 · 0 comments

Comments

@tbcvl
Copy link
Contributor

tbcvl commented Oct 29, 2020

To reproduce, call septentrion CLI with --config-file option, e.g.:
septentrion --config-file=some_file.ini --target-version=1.0 migrate

It will fail:

  ...
  File "/tmp/venv/lib/python3.7/site-packages/septentrion/cli.py", line 37, in load_config
    ctx.default_map = configuration.load_configuration_files(value)
  File "/tmp/venv/lib/python3.7/site-packages/septentrion/configuration.py", line 193, in load_configuration_files
    return parse_configuration_file(file_contents)
  File "/tmp/venv/lib/python3.7/site-packages/septentrion/configuration.py", line 82, in parse_configuration_file
    parser.read_string(content)
  File "/usr/local/lib/python3.7/configparser.py", line 721, in read_string
    sfile = io.StringIO(string)
TypeError: initial_value must be str or None, not bytes
script returned exit code 1
tbcvl pushed a commit that referenced this issue Oct 29, 2020
tbcvl pushed a commit that referenced this issue Oct 29, 2020
tbcvl pushed a commit that referenced this issue Oct 30, 2020
tbcvl pushed a commit that referenced this issue Oct 30, 2020
#90 fix CLI call with --config-file option
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