Welcome, Guest
Username: Password: Remember me
Software
  • Page:
  • 1

TOPIC:

Fehlermeldung PiLogger-bottle.py 2 years 4 months ago #1

  • ELGono
  • ELGono's Avatar Topic Author
  • Offline
  • Posts: 7
  • Thank you received: 2
Komischerweise startet der Webmonitor nach einem Restart des Pi-4 nicht mehr.
Das PiLo-Error.log gab nicht weiter, also habe ich die datei mal manuell ausgeführt:
pi@raspberrypi:~ $ /usr/bin/python3 PiLogger-bottle.py
Traceback (most recent call last):
  File "/home/pi/PiLogger-bottle.py", line 310, in PiLoInit
    TimeCount = float(f.readline())                             # summierte Zeit für Dauer-Energie-Zähler
ValueError: could not convert string to float: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pi/PiLogger-bottle.py", line 1281, in <module>
    PiLoInit()
  File "/home/pi/PiLogger-bottle.py", line 325, in PiLoInit
    LogZeit = datetime.strptime(Zeitstring,"%Y-%m-%d %H:%M:%S")
UnboundLocalError: local variable 'Zeitstring' referenced before assignment

Eine Neuinstallation des scripts brachte auch nichts.
Das Board wird auf dem I2C bus erkannt:
pi@raspberrypi:~ $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
System Information
------------------

Raspberry Pi 4 Model B Rev 1.4
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"

Linux raspberrypi 5.10.63-v8+ #1488 SMP PREEMPT Thu Nov 18 16:16:16 GMT 2021 aarch64 GNU/Linux

auf dem Pi-400 läuft es ohne Probleme. (letzterer fährt noch ein "Buster", der Pi-4 ein "Bullseye")
Beide sind aber 64bit.

Irgendeine Idee, warum python da auf einmal rumzickt?

Please Log in or Create an account to join the conversation.

Fehlermeldung PiLogger-bottle.py 2 years 4 months ago #2

  • ELGono
  • ELGono's Avatar Topic Author
  • Offline
  • Posts: 7
  • Thank you received: 2
Pi-4 bullseye: (fails)
Python 3.9.2

Pi-400 buster: (works)
Python 3.7.3

Please Log in or Create an account to join the conversation.

Fehlermeldung PiLogger-bottle.py 2 years 4 months ago #3

  • PiLo-Heinz
  • PiLo-Heinz's Avatar
  • Offline
  • Posts: 93
  • Thank you received: 20
Hallo ELGono,
die erste Fehlermeldung sagt, dass der String, der konvertiert werden soll leer ist.
Das ist so nicht erwartet. Wenn das File existiert, sollte auch etwas drin stehen.
Bevor ich tiefer hinein schaue, vielleicht ein schneller Test:
- Die Datei 'Lastlog.txt' mit einem Editor inspizieren.
- wenn, wie vermutet, nichts drin steht: löschen und noch einmal starten.

Bis später,
PiLo-Heinz

Please Log in or Create an account to join the conversation.

Nichts ist unmöglich :-)
Last edit: by PiLo-Heinz. Reason: Typo

Fehlermeldung PiLogger-bottle.py 2 years 4 months ago #4

  • ELGono
  • ELGono's Avatar Topic Author
  • Offline
  • Posts: 7
  • Thank you received: 2
Moin Heinz,

es war wie Du vermutet hast, "Lastlog.txt" war leer. Einmal löschen brachte es dann und nun funktioniert alles wieder.

Und ich hab auch in der falschen Datei nachgeschaut: "PiLo-Error.log"

aber die Fehlermeldungen gehen ja "PiLogger-bottle.log"
/usr/bin/python3 /home/pi/PiLogger-bottle.py > /home/pi/PiLogger-bottle.log 2>&1

Please Log in or Create an account to join the conversation.

Fehlermeldung PiLogger-bottle.py 2 years 4 months ago #5

  • PiLo-Heinz
  • PiLo-Heinz's Avatar
  • Offline
  • Posts: 93
  • Thank you received: 20
Hallo ELGono,
gut zu hören!
Die auslösende Ursache ist noch unklar - wenn es wieder passiert bitte Bescheid geben.
Möglicherweise müsste diese Art von Fehler noch zusätzlich abgefangen werden...:S
Die Datei "PiLo-Error.log" enthält die vorhergesehenen Meldungen - "PiLogger-bottle.log" dagegen
die Systemmeldungen.
Die Datei 'Lastlog.txt' ist eine kleine Arbeitsdatei um Werte permanent zwischen Programmstarts zu halten.

VG
PiLo-Heinz

Please Log in or Create an account to join the conversation.

Nichts ist unmöglich :-)
Last edit: by PiLo-Heinz. Reason: Typo
  • Page:
  • 1
Time to create page: 0.096 seconds