C токеном из гит-репозитория бот запускался нормально. Но после создания нового проекта, другого бота в телеграм, смены токена и конфига и среды с pyenv и direnv в консоли ошибка:
python3.8 app.py
Traceback (most recent call last):
File "app.py", line 17, in <module>
from handlers import dp
File "/home/user/Home/ASITES/python/botch1bot/handlers/__init__.py", line 1, in <module>
from .errors import dp
File "/home/user/Home/ASITES/python/botch1bot/handlers/errors/__init__.py", line 1, in <module>
from .error_handler import dp
File "/home/user/Home/ASITES/python/botch1bot/handlers/errors/error_handler.py", line 3, in <module>
from loader import dp
File "/home/user/Home/ASITES/python/botch1bot/loader.py", line 6, in <module>
bot = Bot(token=config.BOT_TOKEN, parse_mode=types.ParseMode.HTML)
File "/home/user/.pyenv/versions/3.8.0/lib/python3.8/site-packages/aiogram/bot/base.py", line 61, in __init__
api.check_token(token)
File "/home/user/.pyenv/versions/3.8.0/lib/python3.8/site-packages/aiogram/bot/api.py", line 38, in check_token
raise exceptions.ValidationError('Token is invalid!')
aiogram.utils.exceptions.ValidationError: Token is invalid!
проект на гитхабе: Marlin005/botch