Ja, du musst die Configdatei entsprechend deinen Gegebenheiten vor der Ausführung noch anpassen.
Vielen Dank. Jedoch habe ich wieder kein Erfolg ![]()
Code
root@raspberrypi:~# python3 smartmeter.py
26.11.2019 09:57:11 INFO: Connected (version 2.0, client OpenSSH_7.9p1)
26.11.2019 09:57:11 INFO: Authentication (password) successful!
26.11.2019 09:57:12 ERROR: Schwerwiegender Fehler aufgetreten
Traceback (most recent call last):
File "smartmeter.py", line 258, in <module>
main()
File "smartmeter.py", line 222, in main
pg_handler = PGHandler(server.local_bind_port)
File "smartmeter.py", line 105, in __init__
self.connect_db()
File "smartmeter.py", line 112, in connect_db
port=self.port, host="localhost")
File "/root/.local/lib/python3.7/site-packages/psycopg2/__init__.py", line 126, 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" (::1) and accepting
TCP/IP connections on port 43323?
FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres"
Traceback (most recent call last):
File "smartmeter.py", line 258, in <module>
main()
File "smartmeter.py", line 222, in main
pg_handler = PGHandler(server.local_bind_port)
File "smartmeter.py", line 105, in __init__
self.connect_db()
File "smartmeter.py", line 112, in connect_db
port=self.port, host="localhost")
File "/root/.local/lib/python3.7/site-packages/psycopg2/__init__.py", line 126, 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" (::1) and accepting
TCP/IP connections on port 43323?
FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres"
Exception ignored in: <function PGHandler.__del__ at 0x74e767c8>
Traceback (most recent call last):
File "smartmeter.py", line 108, in __del__
self.close_db()
File "smartmeter.py", line 115, in close_db
self.connection.close()
AttributeError: 'NoneType' object has no attribute 'close'
Display More