niciBume / Cat_Prey_Analyzer

Cat Prey Image-Classification with deeplearning
MIT License
142 stars 22 forks source link

Random Crash #12

Closed michi1996 closed 3 years ago

michi1996 commented 3 years ago

Hi Leider läuft das ganze noch nicht ganz rund. Hatte jetzt schon einige male den Crash mit folgendem Error. Manchmal läuft das ganze mehrere Stunden oder Tage Fehlerfrei manchmal läuft es aber nicht mal eine Stunde ohne Crash. Hoffe du kannst etwas damit anfangen:

Cat Detected!
Haar_time:  0.04
Overlap:  0.21794390182819934
Face Detected!
Quelength: 5    Streamsize: 48
Quelength: 6    Streamsize: 48
Quelength: 7    Streamsize: 48
Prey Prediction: True
Pred_Val:  0.52
Total Runtime: 2.6093437671661377
Runtime: 2.6094725131988525
Timestamp at Done Runtime: 2020_11_11_09-26-18.608552
Overhead: 2.773721
Traceback (most recent call last):
  File "cascade.py", line 725, in <module>
    sq_cascade.queque_handler()
  File "cascade.py", line 323, in queque_handler
    self.queque_worker()
  File "cascade.py", line 232, in queque_worker
    self.event_nr = self.get_event_nr()
  File "cascade.py", line 200, in get_event_nr
    tree = ET.parse(os.path.join(self.log_dir, 'info.xml'))
  File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 1197, in parse
    tree.parse(source, parser)
  File "/usr/lib/python3.7/xml/etree/ElementTree.py", line 598, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
Quelength: 5    Streamsize: 48
Quelength: 6    Streamsize: 48
Quelength: 7    Streamsize: 48
Quelength: 8    Streamsize: 48
Quelength: 9    Streamsize: 48
Quelength: 10   Streamsize: 48
Quelength: 11   Streamsize: 48
Quelength: 12   Streamsize: 48
Quelength: 13   Streamsize: 48
Quelength: 14   Streamsize: 48
Quelength: 15   Streamsize: 48
Quelength: 16   Streamsize: 48
Quelength: 17   Streamsize: 48
Quelength: 18   Streamsize: 48
Quelength: 19   Streamsize: 48
Quelength: 20   Streamsize: 48
Quelength: 21   Streamsize: 48
Quelength: 22   Streamsize: 48
Quelength: 23   Streamsize: 48
Quelength: 24   Streamsize: 48
Loop ended, starting over.
Exception ignored in: <generator object PiCamera.capture_continuous at 0x9a5f6cb0>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/picamera/camera.py", line 1713, in capture_continuous
    del self._encoders[splitter_port]
KeyError: 0
Quelength: 25   Streamsize: 48
Quelength: 26   Streamsize: 48
Quelength: 27   Streamsize: 48
Quelength: 28   Streamsize: 48
Quelength: 29   Streamsize: 48
Quelength: 30   Streamsize: 48
Quelength: 31   Streamsize: 48
Quelength: 32   Streamsize: 48
Quelength: 33   Streamsize: 48
Quelength: 34   Streamsize: 48
Quelength: 35   Streamsize: 48
Quelength: 36   Streamsize: 48
Quelength: 37   Streamsize: 48
Quelength: 38   Streamsize: 48
Quelength: 39   Streamsize: 48
Quelength: 40   Streamsize: 48
Quelength: 41   Streamsize: 48
Quelength: 42   Streamsize: 48
Quelength: 43   Streamsize: 48
Quelength: 44   Streamsize: 48
Quelength: 45   Streamsize: 48
Quelength: 46   Streamsize: 48
Quelength: 47   Streamsize: 48
Quelength: 48   Streamsize: 48
Quelength: 49   Streamsize: 48
Quelength: 50   Streamsize: 48
Quelength: 51   Streamsize: 48
Quelength: 52   Streamsize: 48
Quelength: 53   Streamsize: 48
Quelength: 54   Streamsize: 48
Quelength: 55   Streamsize: 48
Quelength: 56   Streamsize: 48
Quelength: 57   Streamsize: 48
Quelength: 58   Streamsize: 48
Quelength: 59   Streamsize: 48
Quelength: 60   Streamsize: 48
Quelength: 61   Streamsize: 48
Quelength: 62   Streamsize: 48
Quelength: 63   Streamsize: 48
Quelength: 64   Streamsize: 48
Quelength: 65   Streamsize: 48
Quelength: 66   Streamsize: 48
Quelength: 67   Streamsize: 48
Quelength: 68   Streamsize: 48
Quelength: 69   Streamsize: 48
Quelength: 70   Streamsize: 48
Quelength: 71   Streamsize: 48
Quelength: 72   Streamsize: 48
Quelength: 73   Streamsize: 48
Quelength: 74   Streamsize: 48
Quelength: 75   Streamsize: 48
Quelength: 76   Streamsize: 48
Quelength: 77   Streamsize: 48
Quelength: 78   Streamsize: 48
Quelength: 79   Streamsize: 48
Quelength: 80   Streamsize: 48
Quelength: 81   Streamsize: 48
Quelength: 82   Streamsize: 48
Quelength: 83   Streamsize: 48
Quelength: 84   Streamsize: 48
Quelength: 85   Streamsize: 48
Loop ended, starting over.
Exception ignored in: <generator object PiCamera.capture_continuous at 0x941fbf30>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/picamera/camera.py", line 1713, in capture_continuous
    del self._encoders[splitter_port]
KeyError: 0
Quelength: 86   Streamsize: 48
Quelength: 87   Streamsize: 48
Quelength: 88   Streamsize: 48
Quelength: 89   Streamsize: 48
Quelength: 90   Streamsize: 48
Quelength: 91   Streamsize: 48
Quelength: 92   Streamsize: 48
Quelength: 93   Streamsize: 48
Quelength: 94   Streamsize: 48
Quelength: 95   Streamsize: 48
Quelength: 96   Streamsize: 48
Quelength: 97   Streamsize: 48
Quelength: 98   Streamsize: 48
Quelength: 99   Streamsize: 48
Quelength: 100  Streamsize: 48
Quelength: 101  Streamsize: 48
Quelength: 102  Streamsize: 48
Quelength: 103  Streamsize: 48
Quelength: 104  Streamsize: 48
Quelength: 105  Streamsize: 48
Quelength: 106  Streamsize: 48
Quelength: 107  Streamsize: 48
Quelength: 108  Streamsize: 48
Quelength: 109  Streamsize: 48
Quelength: 110  Streamsize: 48
Quelength: 111  Streamsize: 48
Quelength: 112  Streamsize: 48
Quelength: 113  Streamsize: 48
Quelength: 114  Streamsize: 48
Quelength: 115  Streamsize: 48
Quelength: 116  Streamsize: 48
Quelength: 117  Streamsize: 48
Exception in thread Thread-8:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/home/pi/CatPreyAnalyzer/camera_class.py", line 39, in fill_queue
    image = cv2.imdecode(data, 1)
cv2.error: OpenCV(4.4.0) /tmp/pip-install-aty2tyyk/opencv-python/opencv/modules/core/src/alloc.cpp:73: error: (-4:Ins                                                                                               ufficient memory) Failed to allocate 15116544 bytes in function 'OutOfMemoryError'
niciBume commented 3 years ago

Komisch, bei mir läuft es jetzt schon mehrere Wochen... Kannst du mir mal den Inhalt von /log/info.xml zeigen?

michi1996 commented 3 years ago

Das File /log/info.xml existiert zwar hat aber kein Inhalt. Woran kann das liegen?

niciBume commented 3 years ago

Sollte nicht sein! Kann dir nicht sagen wiso da nichts drin ist. Aber füge bitte den Inhalt von: https://github.com/niciBume/Cat_Prey_Analyzer/blob/master/log/info.xml

michi1996 commented 3 years ago

Hab ich gemacht. Könnte das der Auslöser für den Fehler sein? Komisch das mein info.xml leer ist obwohl ich das Repo komplett heruntergeladen habe.

niciBume commented 3 years ago

Ich will es schwer hoffen! Wenn du dir deinen log anschaust, wird bei jedem event eine Zeile ins .csv eingefügt. Das .xml braucht es nur um auch nach einem reboot eine unique id zu haben. Ist aber nicht wirklich so wichtig. Evt. ist dein Pi speichertechnisch sehr stark ausgelastet und konnte die neu Beschreibung nicht ausführen?

michi1996 commented 3 years ago

Hab auf meiner SD noch 50GB Frei, das sollte also kein Problem sein. Ich werde mal schauen ob es nun besser läuft, falls es nochmals Crasht ziehe ich mir das Repo nochmals komplett neu. Ich gebe hier die nächsten Tage bescheid.

niciBume commented 3 years ago

Top 👍

michi1996 commented 3 years ago

Hat nun längere Zeit funktioniert aber vor einigen Tagen hat das Problem dann wieder angefangen. Nun habe ich festgestellt das das File info.xml wieder leer ist. Durch irgendeinen Fehler wird dieses File überschrieben oder bearbeitet das es leer ist.

niciBume commented 3 years ago

Interessant, meine RPI's hatten dieses Problem noch nie... Aber habe kürzlich den code ge'updated damit es unabhängig von dem xml ist. Bzw hab die funktionsaufrufe einfach aus kommentiert. Versuchs mal mit dieser version 👍

michi1996 commented 3 years ago

Alles klar, werde ich machen.

maschde commented 3 years ago

Hi, bei mir taucht auch das Problem auf dass nach unbestimmter Zeit über aufruf von /nodestatus immer derselbe Wert zurückgegeben wird. In meinem Logfile sieht das Ganze folgendermaßen aus: Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Quelength: 1 Streamsize: 48 Nothing to work with => Queque_length: 1 Quelength: 2 Streamsize: 48 Nothing to work with => Queque_length: 2 Nothing to work with => Queque_length: 2 Quelength: 3 Streamsize: 48 Working the Queque with len: 3 2021_03_25_02-21-47.615316 CC_time: 0.4147934913635254 CC_Do Time: 0.44158124923706055 No Cat Found... Total Runtime: 0.44852757453918457 Runtime: 0.44857001304626465 Timestamp at Done Runtime: 2021_03_25_02-21-48.226128 Overhead: 0.610812 NO CAT FOUND! Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Quelength: 1 Streamsize: 48 Nothing to work with => Queque_length: 1 Quelength: 2 Streamsize: 48 Nothing to work with => Queque_length: 2 Nothing to work with => Queque_length: 2 Nothing to work with => Queque_length: 2 Nothing to work with => Queque_length: 2 Nothing to work with => Queque_length: 2 Quelength: 3 Streamsize: 48 Loop ended, starting over. Working the Queque with len: 3 2021_03_25_02-21-50.017473 CC_time: 0.40534353256225586 CC_Do Time: 0.4323999881744385 No Cat Found... Total Runtime: 0.4391052722930908 Runtime: 0.4391467571258545 Timestamp at Done Runtime: 2021_03_25_02-21-50.683713 Overhead: 0.66624 NO CAT FOUND! Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Es taucht also wie es aussieht unmittelbar davor kein Fehler auf. Kann ich noch an anderer Stelle nach logs suchen? Für diesen log habe ich in crontab den output umgeleitet in mein logfile.

Was mir aufgefallen ist dass ich zeitweise die folgende Meldung bekomme: Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Quelength: 1 Streamsize: 48 Nothing to work with => Queque_length: 1 Quelength: 2 Streamsize: 48 Nothing to work with => Queque_length: 2 Nothing to work with => Queque_length: 2 Nothing to work with => Queque_length: 2 Nothing to work with => Queque_length: 2 Quelength: 3 Streamsize: 48 Working the Queque with len: 3 2021_03_25_02-19-42.420274 Quelength: 4 Streamsize: 48 CC_time: 0.5002121925354004 CC_Do Time: 0.5485155582427979 No Cat Found... Total Runtime: 0.5573434829711914 File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1713, in capture_continuous del self._encoders[splitter_port] KeyError: 0 Exception ignored in: <generator object PiCamera.capture_continuous at 0x9e516bf0> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1713, in capture_continuous del self._encoders[splitter_port] KeyError: 0 Exception ignored in: <generator object PiCamera.capture_continuous at 0x9e63ff70> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1713, in capture_continuous del self._encoders[splitter_port] KeyError: 0 Exception ignored in: <generator object PiCamera.capture_continuous at 0x9e63ff70> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1713, in capture_continuous del self._encoders[splitter_port] KeyError: 0 Exception ignored in: <generator object PiCamera.capture_continuous at 0x9e63ff70> Traceback (most recent call last): File "/usr/lib/python3/dist-packages/picamera/camera.py", line 1713, in capture_continuous del self._encoders[splitter_port] KeyError: 0 Exception ignored in: <generator object PiCamera.capture_continuous at 0x9e63ff70> Die Meldung kommt einige Male, bleibt dann wieder aus und es läuft alles weiter wie gehabt. Direkt nach dem Start kommt ausserdem folgender Hinweis: Executing CatPreyAnalyzer 2021-03-23 11:02:34.177051: E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so: cannot open shared object file: No such file or directory WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version. Instructions for updating: If using Keras pass *_constraint arguments to layers.

Übrigens eine super Arbeit dieses Projekt, ich bleibe auf jeden Fall weiter dran. Wenn du weitere Angaben oder logs brauchst

niciBume commented 3 years ago

Hey! Wann hast du das Projekt als letztes ge'pulled? Eigentlich sollte dieses Problem nun behoben sein. Zumindest mein System läuft seit mehreren Monaten. Soweit ich weiss war der Fehler dass ich das Memory nicht richtig ge'handled habe und irgendwann das RAM überläuft (trotz garbage collector...)

Die zweite Meldung, kommt von der Kamera. Da weiss ich nicht was abgeht, denke aber nicht dass es system relevant ist.

Der hadoop error kommt vom import von tensorflow. Höchst wahrscheinlich, weil tensorflow damals nicht wirklich für das Pi kompatibel war. Daher die komplizierte Anleitung um es zu installieren (weiss nicht wie der heutige Stand der Dinge ist). Aber es läuft bei mir auch mit diesem error.

Danke für die lieben Worte!

maschde commented 3 years ago

Ich habe das Projekt erst vor ca. 2 Wochen auf dem Pi aufgesetzt, damals mit git clone https://github.com/niciBume/Cat_Prey_Analyzer.git gezogen ins Verzeichnis /home/pi/CatPreyAnalyzer. Ich kanns auch gerne heute Abend nochmal neu ziehen. Zuletzt lief es nun ca. 36 Std. davor meist nur max. 3 Std. Ich habe am Code bis auf die Telegram-Daten bisher nichts verändert. Wenn es dann läuft würde ich mir einen E-Mail Versand einbauen weil meine Frau kein Telegram hat und will.

niciBume commented 3 years ago

Zu dieser Zeit sollten die Änderungen schon drauf gewesen sein. Aber 3-36 std. sind sehr mickrig. Bei mir waren es davor ca eine Woche! Welches Pi hast du? Ich brauche das RPI4 mit 4GB RAM. Falls du eine ältere Version brauchst könnte dies evt. der Grund sein i.e zu wenig CPU power & zu wenig Speicher.

maschde commented 3 years ago

Ich habe auch den RPi4 mit 4 GB. Habe ich dafür extra bestellt. Der ist sogar ohne GUI aufgesetzt, sollte also noch mehr Ressourcen übrig haben. Ich lade mir mal das Projekt nochmal neu und melde mich ggf. wieder.

maschde commented 2 years ago

Hallo, ich bin das Ganze jetzt nochmal angegangen weil ich im Moment etwas mehr Zeit habe. Ich habe alles noch einmal von Grund auf neu installiert, jedoch mit immer noch dem selben Problem. Eigentlich mach ich das sehr ungern weil mich das ärgert dass ich es selbst nicht hinbekomme, aber wäre es möglich dass ich auf irgendeinem Weg ein Image bekommen könnte?

niciBume commented 2 years ago

Hi! Ein image gebe ich wirklich sehr ungern raus wegen all meinen privaten infos etc. Jedoch glaube ich dass das Problem auf die Internetstabilität zurückzuführen ist. Kannst du das mal noch bei dir überprüfen? Das system evt. Probeweise ans LAN anknüpfen?

maschde commented 2 years ago

Kann ich verstehen, ist auch kein Problem. Ich werde es mal verkabelt versuchen. Wird die Internetverbindung von Tensorflow benötigt? Ich war der Annahme dass ich diese nach der Installation nur noch zum Nachrichtenversand benötige.

niciBume commented 2 years ago

Nein die bildverarbeitung ist absolut lokal. Aber sobald eine Nachricht versendet wird braucht es natürlich eine Verbindung. Ich habe in meinem code kein exception handling falls doch keine Verbindung steht...

Inkfiziert commented 2 years ago

Ich schließe mich da mal an :( Ich bin auch seit 3 Wochen nun verzweifelt am hin und her probieren, bekomme das Projekt aber nicht ans laufen :( Also schon, es läuft, ich werde auch in Telegram begrüßt, aber das war es dann auch schon. Im Terminal habe ich folgenden Output:

pi@raspberrypi:~/CatPreyAnalyzer $ python3 cascade.py
2021-11-12 08:29:27.890480: E tensorflow/core/platform/hadoop/hadoop_file_system.cc:132] HadoopFileSystem load error: libhdfs.so: cannot open shared object file: No such file or directory
CatCamPy: /home/pi
Log Dir: /home/pi/CatPreyAnalyzer/log
/home/pi/tensorflow1/models/research
/home/pi/tensorflow1/models/research/object_detection
CNN is ready to go!
WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling BaseResourceVariable.__init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
2021-11-12 08:30:15.681251: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 9437184 exceeds 10% of system memory.
2021-11-12 08:30:15.731182: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 9437184 exceeds 10% of system memory.
2021-11-12 08:30:15.740614: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 9437184 exceeds 10% of system memory.
2021-11-12 08:30:15.814248: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 9437184 exceeds 10% of system memory.
2021-11-12 08:30:15.930307: W tensorflow/core/framework/cpu_allocator_impl.cc:81] Allocation of 9437184 exceeds 10% of system memory.
dummy_img.jpg
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 646, in _network_loop_retry
    if not action_cb():
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 601, in polling_action_cb
    allowed_updates=allowed_updates,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/extbot.py", line 228, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 130, in decorator
    result = func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 2865, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 296, in _post
    f'{self.base_url}/{endpoint}', data=data, timeout=effective_timeout
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 366, in post
    **urlopen_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 283, in _request_wrapper
    raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 646, in _network_loop_retry
    if not action_cb():
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 601, in polling_action_cb
    allowed_updates=allowed_updates,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/extbot.py", line 228, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 130, in decorator
    result = func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 2865, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 296, in _post
    f'{self.base_url}/{endpoint}', data=data, timeout=effective_timeout
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 366, in post
    **urlopen_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 283, in _request_wrapper
    raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 646, in _network_loop_retry
    if not action_cb():
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 601, in polling_action_cb
    allowed_updates=allowed_updates,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/extbot.py", line 228, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 130, in decorator
    result = func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 2865, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 296, in _post
    f'{self.base_url}/{endpoint}', data=data, timeout=effective_timeout
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 366, in post
    **urlopen_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 283, in _request_wrapper
    raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 646, in _network_loop_retry
    if not action_cb():
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 601, in polling_action_cb
    allowed_updates=allowed_updates,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/extbot.py", line 228, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 130, in decorator
    result = func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 2865, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 296, in _post
    f'{self.base_url}/{endpoint}', data=data, timeout=effective_timeout
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 366, in post
    **urlopen_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 283, in _request_wrapper
    raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 646, in _network_loop_retry
    if not action_cb():
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 601, in polling_action_cb
    allowed_updates=allowed_updates,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/extbot.py", line 228, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 130, in decorator
    result = func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 2865, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 296, in _post
    f'{self.base_url}/{endpoint}', data=data, timeout=effective_timeout
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 366, in post
    **urlopen_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 283, in _request_wrapper
    raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
CC_time:  30.004043102264404
CC_Do Time: 30.77769708633423
Cat Detected!
Haar_time:  0.86
Overlap:  0.6247896882105722
Face Detected!
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 646, in _network_loop_retry
    if not action_cb():
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 601, in polling_action_cb
    allowed_updates=allowed_updates,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/extbot.py", line 228, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 130, in decorator
    result = func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 2865, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 296, in _post
    f'{self.base_url}/{endpoint}', data=data, timeout=effective_timeout
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 366, in post
    **urlopen_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 283, in _request_wrapper
    raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 646, in _network_loop_retry
    if not action_cb():
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 601, in polling_action_cb
    allowed_updates=allowed_updates,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/extbot.py", line 228, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 130, in decorator
    result = func(*args, **kwargs)
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 2865, in get_updates
    api_kwargs=api_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/bot.py", line 296, in _post
    f'{self.base_url}/{endpoint}', data=data, timeout=effective_timeout
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 366, in post
    **urlopen_kwargs,
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/utils/request.py", line 283, in _request_wrapper
    raise Conflict(message)
telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
Prey Prediction: True
Pred_Val:  0.59
Total Runtime: 48.884448766708374
Runtime: 49.533254623413086
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Nothing to work with => Queque_length: 0
Quelength: 1    Streamsize: 48
Nothing to work with => Queque_length: 1
Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running
No error handlers are registered, logging exception.
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.7/site-packages/telegram/ext/updater.py", line 646, in _network_loop_retry
    if not action_cb():
niciBume commented 2 years ago

Hi Seems to me that it is a telegram error: telegram.error.Conflict: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running Error while getting Updates: Conflict: terminated by other getUpdates request; make sure that only one bot instance is running No error handlers are registered, logging exception.

It suggests you're running multiple bots? The CNN seem to be running fine, as they are able zo process the dummy data.

However your camera does not seem to generate images for the queue? Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing to work with => Queque_length: 0 Nothing