pysonDB icon indicating copy to clipboard operation
pysonDB copied to clipboard

When updating in loop with 2seconds brokes the file

Open MrMirhan opened this issue 4 years ago • 5 comments

Describe the bug I'm trying to update my json every 2 seconds but after couple updateing it will be broken.

This is the normal ending of my json file. Ekran Resmi 2022-03-28 23 05 49

This is the broken json Ekran Resmi 2022-03-28 23 06 27

This is the error code Ekran Resmi 2022-03-28 23 08 16

MrMirhan avatar Mar 28 '22 20:03 MrMirhan

From the TraceBack, I assume you are using Threads.. Uhhhh.... This package and threads do not work that well. We might work on a fix, but these days we both are kind of busy with college and other stuff so it will probably take some time. And sorry for the inconvenience 🙃 .

Adwaith-Rajesh avatar Mar 29 '22 03:03 Adwaith-Rajesh

That's okay thanks for responding :)

MrMirhan avatar Mar 29 '22 05:03 MrMirhan

Have been facing the same issue in the recent past. mostly when there's quick updation of the db file. I saw some "null" characters appended as well. any workaround would be appreciated.

suhasa010 avatar May 10 '22 14:05 suhasa010

@suhasa010 @MrMirhan is it possible for you guys run the test on pysondb-v2 and check whether the same issue happens or not.

install pysondb-v2 with this command. pip3 install pysondb-v2[all]

make sure that you delete the old version. and also check the docs.(the names of the methods have changed so that it follow PEP8 conventions)

Adwaith-Rajesh avatar May 20 '22 03:05 Adwaith-Rajesh

Did anyone find a fix to the issue? I want the use the pysondb with backgroundscheduler and I get the same symptoms

itzikorfa avatar Jan 22 '23 22:01 itzikorfa