You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After cloning the repository and unzipping the zip folder, running docker-compose up -d postgres returns
Creating network "nfldb_default" with the default driver
Creating nfldb_postgres_1... done
Expected: Creating nfldb-postgres... done
Running docker ps:
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b99289fc4048 postgres "docker-entrypoint.s…" 2 hours ago Up 2 hours 5432/tcp nfldb_postgres_1
This does not cause any issues until the python cli:
>>>import nfldb
>>>db = nfldb.connect()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/code/nfldb/db.py", line 142, in connect
host=host, port=port)
File "/virtualenv/lib/python3.7/site-packages/psycopg2/__init__.py", line 127, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not translate host name "nfldb-postgres" to address: Name or service not known
Looked through the docker-compose.yml file and not sure why it would name the container nfldb_postgres_1 but the issue might be with psycopg2 rather than the docker file
The text was updated successfully, but these errors were encountered:
Running Ubuntu 20.04.1 on WSL2.
Following along with the README.MD:
After cloning the repository and unzipping the zip folder, running
docker-compose up -d postgres
returnsExpected:
Creating nfldb-postgres... done
Running docker ps:
This does not cause any issues until the python cli:
Looked through the
docker-compose.yml
file and not sure why it would name the containernfldb_postgres_1
but the issue might be with psycopg2 rather than the docker fileThe text was updated successfully, but these errors were encountered: