When I run docker-compose.yml on windows, an error comes up, even though everything in the code is correct.
With packages exactly no errors, all checked 2 times, perhaps the problem with the imports, which begin with a dot, but then how to replace them?
Error
[+] Running 2/0
✔ Container astrodb Created 0.0s
✔ Container tgbot Created 0.0s
Attaching to astrodb, tgbot
tgbot | Traceback (most recent call last):
tgbot | File "/app/run.py", line 2, in <module>
tgbot | import src.main
tgbot | File "/app/src/main.py", line 3, in <module>
tgbot | from aiogram import Bot, Dispatcher
tgbot | File "/usr/local/lib/python3.11/site-packages/aiogram/__init__.py", line 4, in <module>
tgbot | from .client.bot import Bot
tgbot | File "/usr/local/lib/python3.11/site-packages/aiogram/client/bot.py", line 24, in <module>
tgbot | from ..methods import (
tgbot | File "/usr/local/lib/python3.11/site-packages/aiogram/methods/__init__.py", line 1, in <module>
tgbot | from .add_sticker_to_set import AddStickerToSet
tgbot | File "/usr/local/lib/python3.11/site-packages/aiogram/methods/add_sticker_to_set.py", line 5, in <module>
tgbot | from ..types import InputFile, MaskPosition
tgbot | File "/usr/local/lib/python3.11/site-packages/aiogram/types/__init__.py", line 16, in <module>
tgbot | from .callback_query import CallbackQuery
tgbot | File "/usr/local/lib/python3.11/site-packages/aiogram/types/callback_query.py", line 15, in <module>
tgbot | class CallbackQuery(TelegramObject):
tgbot | File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 292, in __new__
tgbot | cls.__signature__ = ClassAttribute('__signature__', generate_model_signature(cls.__init__, fields, config))
tgbot | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tgbot | File "/usr/local/lib/python3.11/site-packages/pydantic/utils.py", line 258, in generate_model_signature
tgbot | merged_params[param_name] = Parameter(
tgbot | ^^^^^^^^^^
tgbot | File "/usr/local/lib/python3.11/inspect.py", line 2722, in __init__
tgbot | raise ValueError('{!r} is not a valid parameter name'.format(name))
tgbot | ValueError: 'from' is not a valid parameter name
tgbot exited with code 1
Code
import asyncio
from aiogram import Bot, Dispatcher
from aiogram.fsm.storage.memory import MemoryStorage
from loguru import logger
from .config import config
from .db.base import check_db_conn
from .misc.scheduler import start_scheduler
from .payments.payment import start_payments
from .routes import register_all_routes
from .worker import start_worker