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

Ошибка при запуске field required (type=value_error.missing) #14

Open
helix4d opened this issue Jul 10, 2024 · 2 comments

Comments

@helix4d
Copy link

helix4d commented Jul 10, 2024

Пробовал Python 3.10 и 3.11, разные версии aiogram и pydantic
python3.10 -m bot
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/mk/telegram-feedback-bot_ktu_priyom/bot/main.py", line 10, in
from bot.commandsworker import set_bot_commands
File "/home/mk/telegram-feedback-bot_ktu_priyom/bot/commandsworker.py", line 4, in
from bot.config_reader import config
File "/home/mk/telegram-feedback-bot_ktu_priyom/bot/config_reader.py", line 22, in
config = Settings()
File "pydantic/env_settings.py", line 39, in pydantic.env_settings.BaseSettings.init
File "pydantic/main.py", line 342, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 3 validation errors for Settings
bot_token
field required (type=value_error.missing)
admin_chat_id
field required (type=value_error.missing)
remove_sent_confirmation
field required (type=value_error.missing)

@MasterGroosha
Copy link
Owner

Привет, судя по ошибке, вы не передаёте никакие настройки в бота. Как запускаете?

@helix4d
Copy link
Author

helix4d commented Jul 10, 2024

Привет, судя по ошибке, вы не передаёте никакие настройки в бота. Как запускаете?

Спасибо, что ответили. Посмотрел, во время переименования не набрал точку в .env
Исправил, все работает.
Бот отличный. Поднимал два (без докера через systemd), uptime по полгода, все работало как часы.

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

2 participants