File sync problem
dphdmn

I am running a python bot here, and having a problem with files, that are modified or created with my python code.

Changes that are done in file editor seems to be ok, but changes done by code are weird:
I have file, let's say "results.txt" and collect data in it, sometimes i reset the data, and write other information in this file, so old data is just overwritten by code.
But after i run code again once, i saw that new data was gone. It was collecting new data properly at first, but after some time, (or just after restarting the program(?)) results in this file just got "back in time" and all new data was completely gone, and in files i had old data, that was overwritten, like it loaded backup of this file from server.

So my questions: is it because my files are not synchronizes well with some server-version of my project?
And if so, is there any way to make sure, that my changes to files are final and will not get back in time?
Is there any simple tools i can use to collect/read data without being afraid of loosing it?

You are viewing a single comment. View All
InvisibleOne

Well, the issue is that changes to files are not saved unless you are "logged on" to replit and changing it, but you if you are running the code through a discord bot or something, then it isn't running the code as you, so it can't save any of the changes to files.