I have server running on apache. I use bottle.py. When I'm going to xxx/getbio, SOMETIMES it returns :
Error: 500 Internal Server Error: Template 'bio' not found.
This error occurs not all time: if I restart apache, it's normalizing for several hours, but happens again. Here is code fragment :
@route('/getbio')
def getBio():
return template('bio')
Here is file structure :
xxx/
├── views/
│ ├── bio.tpl
└── index.py
And I didin't missed following lines of code:
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
sys.path.append('views')
os.chdir(os.path.dirname(os.path.abspath(__file__)))
Please help me, because I don't have idea how to fix this bug