You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat file.yaml
uri: "amqp://localhost:5672/%2F"
$ python
Python 3.7.4 (default, Oct 1 2019, 17:17:01)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pymlconf import Root
>>> Root().loadfile('file.yaml')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../site-packages/pymlconf/models.py", line 236, in loadfile
loadedyaml = yaml_.load(filename, self.context)
File ".../site-packages/pymlconf/yaml_.py", line 30, in load
return loads(f.read(), context)
File ".../site-packages/pymlconf/yaml_.py", line 20, in loads
str_data = preprocess(str_data, context)
File ".../site-packages/pymlconf/yaml_.py", line 15, in preprocess
return data % context
TypeError: must be real number, not dict
Because %2F is considered string format specifier (if not escaped, e.g. with another %).
The text was updated successfully, but these errors were encountered:
gyermolenko
changed the title
Configs with values with percent signs (%) can't be loaded -> TypeError
Configs with values with percent signs (%) can't be loadfile'd-> TypeError
May 26, 2020
Yaml values containing
%
can causeTypeError
s.Because
%2F
is considered string format specifier (if not escaped, e.g. with another%
).The text was updated successfully, but these errors were encountered: