line 52, in wrap_dbapi_exceptions
return func(provider, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pony/orm/dbapiprovider.py", line 230, in connect
return provider.pool.connect()
File "/usr/local/lib/python3.9/site-packages/pony/orm/dbapiprovider.py", line 351, in connect
pool._connect()
File "/usr/local/lib/python3.9/site-packages/pony/orm/dbproviders/postgres.py", line 184, in _connect
pool.con = pool.dbapi_module.connect(*pool.args, **pool.kwargs)
File "/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/./main.py", line 1, in <module>
import api
File "/app/api/__init__.py", line 6, in <module>
from .routers.song import song_router
File "/app/api/routers/song.py", line 2, in <module>
from database.managers.song import SongManager
File "/app/database/managers/song.py", line 5, in <module>
from database.models import Song
File "/app/database/models/__init__.py", line 16, in <module>
db.bind(
File "/usr/local/lib/python3.9/site-packages/pony/orm/core.py", line 774, in bind
self._bind(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pony/orm/core.py", line 796, in _bind
self.provider = provider_cls(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pony/orm/dbapiprovider.py", line 130, in __init__
connection, is_new_connection = provider.connect()
File "<string>", line 2, in connect
File "/usr/local/lib/python3.9/site-packages/pony/orm/dbapiprovider.py", line 72, in wrap_dbapi_exceptions
raise OperationalError(e)
pony.orm.dbapiprovider.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
Какой ещё локалхост?
Обсуждают сегодня