It's a very basic part, but when I started the sample locally, I got "Error: 500 Internal Server Error, that's it!" In the browser and the error log was not displayed on the console, so I was in trouble. I will leave it.
main.py
# -*- coding: utf-8 -*-
import logging
#↓ Import debug
from bottle import Bottle, debug
bottle = Bottle()
#↓ Debug mode ON!
debug(True)
@bottle.route('/')
def home():
return 'Hello'
@bottle.error(404)
def error_404(error):
return 'Sorry, Nothing at this URL.'
If you hit debug (True) for the time being, a detailed error log will be displayed at the time of Server Error. That's all, but python beginners didn't understand, yes ...
Recommended Posts