Forums

Something went wrong :-( This website is hosted by PythonAnywhere, an online hosting environment. Something went wrong while trying to load it; please try again later.

2021-06-28 17:40:19,760: Error running WSGI application 2021-06-28 17:40:19,768: psycopg2.OperationalError: could not connect to server: No such file or directory 2021-06-28 17:40:19,768: #011Is the server running locally and accepting 2021-06-28 17:40:19,768: #011connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? 2021-06-28 17:40:19,768: 2021-06-28 17:40:19,768: File "/var/www/eyobkibret15_pythonanywhere_com_wsgi.py", line 110, in <module> 2021-06-28 17:40:19,769: from server import app as application # noqa 2021-06-28 17:40:19,769: 17:40:19,769: File "/home/eyobkibret15/Content-aggregator-for-news/server.py", line 7, in <module>

2021-06-28 17:40:19,769: database.insert_into_database("aljazeera", title, titlelink, time, detaillink, detail)

2021-06-28 17:40:19,769: File "/home/eyobkibret15/Content-aggregator-for-news/database.py", line 41, in insert_into_database

17:40:19,770: connection = psycopg2.connect(dbname="postgres", user="postgres", password="######")

2021-06-28 17:40:19,770: File "/home/eyobkibret15/.virtualenvs/myvirtualenv/lib/python3.8/site-packages/psycopg2/init.py", line 122, in connect

17:40:19,770: conn = _connect(dsn, connection_factory=connection_factory, **kwasync)

any one help with this database connection error error

Use the server details provided on your Databases tab to connect to the database.

can i use the database that runs on my machine , i have a normal paid account

Yes you can use. They have both option Mysql and sql lite. You can use Mysql or Sql lite( which is default in pythonanywhere).

You can use a database that runs on your machine if your machine is accessible from the general internet.