Forums

Files reverting to older versions

Here is what happened: I compressed all the files in my account directory into a zip file and downloaded it to use off pythonanywhere. After trying to run my web app, there were several things missing which were present on my pythonanywhere site. I compared the files in the zip file to the files on the website; nothing was missing and both copies were identical. I didn't understand why some features would be present in one and missing in the other when both were identical code-wise. I looked deeper and realized that portions of my code were missing from files in both copies. After clicking to reload the pythonanythere site, it no longer had the features it had before the reload, but the files hadn't changed.

What I think happened: I think my files reverted to older versions for reasons unknown, but pythonanywhere continued to serve the original files with up-to-date features from some sort of cache or pre-compiled version. To be clear, I didn't revert the files. It must have been a glitch in pythonanywhere.

I need my files with the most recent changes. They are significantly different from the old versions that replaced them. How can they be recovered?

Hi there, I can explain part of the story -- your web app gets loaded into memory whenever you hit "reload", and then it will continue to be served from memory, and it will ignore any changes you make to its (python) files until you next hit reload. So that would explain why your webapp was working just fine even though half the code was missing, until you hit "reload".

As to why half the files went missing, I'm not sure. I can't think of anything at our end that might have cause that. Are you using git or another version control system? That's always a good idea...