Forums

Error log file not updating

I've seen this same question in the forum a few times but nothing clear in terms of a solution? I just started using PythonAnywhere and trying to debug when the error log isn't updated for hours is a real pain the butt. Any solution available?

We need more details to help you. Could you describe what you are doing and what you expect?

I have a python app using flask to generate map projections and great circle paths on those projections. The output is a .png file which is supposed to get written to the home directory, but it's not. So I look at the error log to get some information as to where this is going wrong. I then see as a regular pattern that the last record in the error log is several hours old. I then give up and take the dog for walk... Run the app again and check the log... Still no updates. I then give up again and cook dinner... After dinner, washing up, etc... I run the app again and check the error log... Still not up-to-date. I got to bed and sleep... Next morning, I notice the last record in the error log is now more up-to-date... so I run the App but no new records are observed in the error log and the Groundhog Day begins again.

Ok, I found the issue. It was to do with a bug in my python code such that a POST wasn't being executed and I suppose therefore that it never got far enough in the scheme of things for errors to be posted to the error log.

Glad to hear that you found it!