All the config toml suggestions of None are misleading
nickfarrow opened this issue · 0 comments
nickfarrow commented
If you actually use None for some parameters the toml will give a confusing error like
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/gunicorn/app/base.py", line 111, in get_config_from_filename
spec.loader.exec_module(mod)
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/SatSale/gunicorn.conf.py", line 1, in <module>
from gateways import ssh_tunnel
File "/root/SatSale/gateways/ssh_tunnel.py", line 5, in <module>
import config
File "/root/SatSale/config.py", line 17, in <module>
config = toml.load(config_file)
File "/usr/local/lib/python3.7/dist-packages/toml/decoder.py", line 156, in load
return loads(f.read(), _dict, decoder)
File "/usr/local/lib/python3.7/dist-packages/toml/decoder.py", line 514, in loads
raise TomlDecodeError(str(err), original, pos)
toml.decoder.TomlDecodeError: This float doesn't have a leading digit (line 44 column 1 char 2335)
Should probably all be changed to ""
or something along those lines.