discord-modmail / modmail

A Modmail bot for Discord. Allowing safe moderator conversations with server members one server at a time.
https://discord-modmail.readthedocs.io/
MIT License
15 stars 8 forks source link

Config fails to load #25

Closed bast0006 closed 3 years ago

bast0006 commented 3 years ago
Traceback (most recent call last):
  File "pypoetry/virtualenvs/modmail-verYnE8i-py3.8/lib/python3.8/site-packages/toml/decoder.py", line 156, in load
    return loads(f.read(), _dict, decoder)
AttributeError: 'NoneType' object has no attribute 'read'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "modmail/__main__.py", line 12, in <module>
    from .bot import ModmailBot
  File "modmail/bot.py", line 9, in <module>
    from .config import CONFIG, INTERNAL
  File "modmail/config.py", line 315, in <module>
    CONFIG = ModmailConfig()
  File "pydantic/env_settings.py", line 37, in pydantic.env_settings.BaseSettings.__init__
  File "pydantic/env_settings.py", line 63, in pydantic.env_settings.BaseSettings._build_values
  File "modmail/config.py", line 56, in toml_default_config_source
    return dict(**toml.load(DEFAULT_CONFIG_PATH))
  File "pypoetry/virtualenvs/modmail-verYnE8i-py3.8/lib/python3.8/site-packages/toml/decoder.py", line 158, in load
    raise TypeError("You can only load a file descriptor, filename or "
TypeError: You can only load a file descriptor, filename or list
bast0006 commented 3 years ago

Dupe #22