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

Fix syntax error logging in configuration #753

Open
jindrahelcl opened this issue Sep 7, 2018 · 0 comments
Open

Fix syntax error logging in configuration #753

jindrahelcl opened this issue Sep 7, 2018 · 0 comments

Comments

@jindrahelcl
Copy link
Member

When there is a typo in the config, e.g.:

[val_data]
o

then the error message looks like this:

Traceback (most recent call last):
  File "/lnet/troja/projects/mtm18-unsupervised/neuralmonkey/bin/neuralmonkey/config/configuration.py", line 73, in load_file
    raw_config, config_dict = parse_file(file, changes)
  File "/lnet/troja/projects/mtm18-unsupervised/neuralmonkey/bin/neuralmonkey/config/parsing.py", line 223, in parse_file
    config = _parse_ini(config_file)
  File "/lnet/troja/projects/mtm18-unsupervised/neuralmonkey/bin/neuralmonkey/config/parsing.py", line 183, in _parse_ini
    config.read_file(line_numbers, source=filename)
  File "/home/helcl/lib/python3.5/configparser.py", line 715, in read_file
    self._read(f, source)
  File "/home/helcl/lib/python3.5/configparser.py", line 1104, in _read
    e = self._handle_error(e, fpname, lineno, line)
  File "/home/helcl/lib/python3.5/configparser.py", line 1124, in _handle_error
    exc = ParsingError(fpname)
  File "/home/helcl/lib/python3.5/configparser.py", line 305, in __init__
    raise ValueError("Required argument `source' not given.")
ValueError: Required argument `source' not given.

fix this.

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