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

Python error if password contains ceratain characters #42

Open
danielo515 opened this issue Nov 5, 2020 · 0 comments
Open

Python error if password contains ceratain characters #42

danielo515 opened this issue Nov 5, 2020 · 0 comments

Comments

@danielo515
Copy link

Seems that password containing chars like % trigger a template rendering error for python. For example my%p4ss%word will trigger the following error:

Loading Configuration File config.ini
Traceback (most recent call last):
  File "/src/influxspeedtest.py", line 3, in <module>
    from influxspeedtest.InfluxdbSpeedtest import InfluxdbSpeedtest
  File "/src/influxspeedtest/InfluxdbSpeedtest.py", line 9, in <module>
    from influxspeedtest.common import log
  File "/src/influxspeedtest/common/__init__.py", line 1, in <module>
    from .utils import log
  File "/src/influxspeedtest/common/utils.py", line 5, in <module>
    from influxspeedtest.config import config
  File "/src/influxspeedtest/config/__init__.py", line 10, in <module>
    config = ConfigManager(config)
  File "/src/influxspeedtest/config/configmanager.py", line 19, in __init__
    self._load_config_values()
  File "/src/influxspeedtest/config/configmanager.py", line 32, in _load_config_values
    self.influx_password = self.config['INFLUXDB'].get('Password', fallback='')
  File "/usr/local/lib/python3.7/configparser.py", line 1301, in get
    fallback=fallback, **kwargs)
  File "/usr/local/lib/python3.7/configparser.py", line 799, in get
    d)
  File "/usr/local/lib/python3.7/configparser.py", line 394, in before_get
    self._interpolate_some(parser, option, L, value, section, defaults, 1)
  File "/usr/local/lib/python3.7/configparser.py", line 444, in _interpolate_some
    "found: %r" % (rest,))
configparser.InterpolationSyntaxError: '%' must be followed by '%' or '(', found: '%p4ss%5'
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