gilestrolab / ethoscope

a platform from monitoring animal behaviour in real time from a raspberry pi
http://lab.gilest.ro/ethoscope/
GNU General Public License v3.0
17 stars 25 forks source link

New error when start tracking #126

Closed SofiPol closed 1 year ago

SofiPol commented 4 years ago

Hi! I'm having this error when I start with the tracking, some idea about what can be the problem?

Sorry there has been an error: Traceback (most recent call last): File "/opt/ethoscope-device/src/ethoscope/web_utils/control_thread.py", line 452, in run self._start_tracking(cam, result_writer, rois, TrackerClass, tracker_kwargs, hardware_connection, StimulatorClass, stimulator_kwargs) File "/opt/ethoscope-device/src/ethoscope/web_utils/control_thread.py", line 318, in _start_tracking self._monit.run(result_writer, self._drawer) File "/opt/ethoscope-device/src/ethoscope/core/monitor.py", line 134, in run raise e File "/opt/ethoscope-device/src/ethoscope/core/monitor.py", line 123, in run result_writer.write(t, track_u.roi, data_rows) File "/opt/ethoscope-device/src/ethoscope/utils/io.py", line 509, in write self._initialise(r, dr) File "/opt/ethoscope-device/src/ethoscope/utils/io.py", line 581, in _initialise self._create_table(table_name, fields) File "/opt/ethoscope-device/src/ethoscope/utils/io.py", line 625, in _create_table self._write_async_command(command) File "/opt/ethoscope-device/src/ethoscope/utils/io.py", line 619, in _write_async_command raise Exception("Async database writer has stopped unexpectedly") Exception: Async database writer has stopped unexpectedly

Thanks! Cheers,

ggilestro commented 4 years ago
Exception: Async database writer has stopped unexpectedly

This normally indicates an issue with the SD card: either the card is damaged or is not fast enough. Please replace with another SD card (ideally different brand) and see if it fixes the issue.

SofiPol commented 4 years ago

Hi Giorgio Thanks for your reply, now i'm having a different problem, I already changed the SD card and flashed the last image, i;m able to make streaming and video recording but when i start tracking the device become offline and nothing happens, the SD card is the red one Samsung EVO+ 32GB I don;t know what could be the problem, I restarted the node, the ethoscope and nothing chage. Some ideas?

Thanks! Cheers, Sofia

On Wed, Aug 12, 2020 at 9:39 AM Giorgio Gilestro notifications@github.com wrote:

Exception: Async database writer has stopped unexpectedly

This normally indicates an issue with the SD card: either the card is damaged or is not fast enough. Please replace with another SD card (ideally different brand) and see if it fixes the issue.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/gilestrolab/ethoscope/issues/126#issuecomment-672736742, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP5XSBJWXX6NYTO2N2UUADSAJIMPANCNFSM4PUIIGOQ .

-- Dra. Sofía Polcowñuk Laboratorio de Genética del Comportamiento Fundación Instituto Leloir

ggilestro commented 4 years ago

Try with a different power supply. I suppose the tracking activates the camera, causes a power surge and the power supply can't give enough current. That's the only thing I can think of anyway.

SofiPol commented 4 years ago

Ok Giorgio Thanks, I will try that, I'm using the Anker power supply with 5 USB but now I only have two ethoscopes connected to it...I will try to change to a different power supply and see what happens, Thanks, Cheers, Sofia

On Wed, Aug 12, 2020 at 11:58 AM Giorgio Gilestro notifications@github.com wrote:

Try with a different power supply. I suppose the tracking activates the camera, causes a power surge and the power supply can't give enough current. That's the only thing I can think of anyway.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/gilestrolab/ethoscope/issues/126#issuecomment-672802975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP5XSHO2PJ7YUUZ4T7EC73SAJYVFANCNFSM4PUIIGOQ .

-- Dra. Sofía Polcowñuk Laboratorio de Genética del Comportamiento Fundación Instituto Leloir

Georges-Farkouh commented 4 years ago

I had a similar problem and I was able to fix it by replugging the camera cable into the raspberry

SofiPol commented 4 years ago

Hi, I tried to replug the camera but I still having a problem, I rebooted the ethoscope, also restarted the Node and I changed the SD card and I'm not able to start tracking, I can make video recordings or streaming but when I started tracking the ethoscope goes offline and then nothing happens...The SD card that i'm using is the new one the 32G EVO+. Could you help me with this?

Thanks, Cheers, Sofia

On Thu, Aug 13, 2020 at 11:51 AM Georges-Farkouh notifications@github.com wrote:

I had a similar problem and I was able to fix it by replugging the camera cable into the raspberry

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/gilestrolab/ethoscope/issues/126#issuecomment-673407171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP5XSCKVI4F3HWS3PKJFULSAPAUTANCNFSM4PUIIGOQ .

-- Dra. Sofía Polcowñuk Laboratorio de Genética del Comportamiento Fundación Instituto Leloir

Georges-Farkouh commented 4 years ago

Could you post an image of how the ethoscope goes offline please Georges

SofiPol commented 4 years ago

20200818_082031.mp4 https://drive.google.com/file/d/1rsvrRD9pj1hFpEov8Ydv1hGC5QBS8AdY/view?usp=drive_web Here is a video of what happens with the ethoscope, as you can see it starts iinitialising and then it comes offline and that's all... On Tue, Aug 18, 2020 at 8:15 AM Georges-Farkouh notifications@github.com wrote:

Could you post an image of how the ethoscope goes offline please Georges

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/gilestrolab/ethoscope/issues/126#issuecomment-675301946, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP5XSH7KGU4MYAJBUSTROTSBITANANCNFSM4PUIIGOQ .

-- Dra. Sofía Polcowñuk Laboratorio de Genética del Comportamiento Fundación Instituto Leloir

ggilestro commented 4 years ago

@SofiPol - is this something that happens with all your ethoscopes or just that one?

SofiPol commented 4 years ago

At this moment I only have two ethoscopes and it's happening with both

On Tue, Aug 18, 2020 at 9:04 AM Giorgio Gilestro notifications@github.com wrote:

@SofiPol https://github.com/SofiPol - is this something that happens with all your ethoscopes or just that one?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gilestrolab/ethoscope/issues/126#issuecomment-675326056, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP5XSGDFUHW5T2DNEJWVGTSBIYXTANCNFSM4PUIIGOQ .

-- Dra. Sofía Polcowñuk Laboratorio de Genética del Comportamiento Fundación Instituto Leloir

antortjim commented 4 years ago

I think the best way to debug the problem is plugging a monitor to the HDMI interface of the RPi (next to the micro USB used by the PSU). Then plug the PSU and you will see the RPi turn on, display the booting process and eventually give you a prompt where you can login. Then try start tracking and see what happens in the monitor. Is the ethoscope still on? Or just offline? Maybe there is an error message displayed? Or maybe it just powers off? This experiment can help figuring it out.

Please note you must plug the HDMI first and only then the PSU. Otherwise, the display will be black, unless the line hdmi_force_hotplug=1 is already in the /boot/config.txt file of the SDcard.

Alternatively, try using the official RPi supply or unplugging the second ethoscope.

Hope it helps!

pepelisu commented 4 years ago

It would also help to know which version of the RPI you are using. Just to isolate odd behavior with untested versions (Rpi4)

SofiPol commented 4 years ago

Thanks to all of you, I will try to check that, I'm not having a monitor now but I will find one, and the version that i'm using is the RPi3 A+ .

Thanks! Cheers, Sofia

On Thu, Sep 10, 2020 at 7:52 AM Pepelisu notifications@github.com wrote:

It would also help to know which version of the RPI you are using. Just to isolate odd behavior with untested versions (Rpi4)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gilestrolab/ethoscope/issues/126#issuecomment-690028678, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQP5XSCEHABBUUBPR37OSL3SFBZRJANCNFSM4PUIIGOQ .

-- Sofía Polcowñuk, PhD

Institute of Cancer Sciences-University of Glasgow

Wolfson Wohl Cancer Research Centre (Room 231)

Garscube Estate, Switchback Road, Bearsden

pepelisu commented 4 years ago

If the RPi are going offline while starting tracking all the time, I would think that the model A with only 512MB of RAM is not enough, and they are crashing while starting. The recommended model is RPI3 B+ with 1GB RAM. I just checked mine and they are using 330MB of RAM while tracking (128MB is shared with the video processor and not usable) so 512MB - 330MB -128MB = 54MB. As soon as they need a little bit extra to start tracking they will freeze and appear to be offline and off. Only a restart will bring them up again. I would suggest to change the RPI for version 3B+