Flask Tutorial Web Development with Python 9 - Error Handling

preview_player
Показать описание
In this Flask web development with Python tutorial video, we cover how we can handle some errors within our Flask application.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Рекомендации по теме
Комментарии
Автор

Hi Harrison, great tutorial.
i have a very annoying problem, i'm trying to build my website in french. but when i write words with special characters (like é or è), i get a ""UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 1482: invalid continuation byte"".
i also added # -*- coding: utf-8 -*- in the top of every file, but it did not solve the problem.
please help me.

rafiklmd
Автор

I am guessing the reason you would have problems consistently getting your 500.html is because 500 is a Server error as opposed to a page error with a 404. If the server is having problems accessing your templates location i doubt it would be able to render the 500.html. My idea anyway.

Veria
Автор

Just wondering: is it possible (and advisable) to have a single html page dealing with all types of html/server errors? (in which case, a function in the __init__ file would have a few if statements to classify the error and the error message would have to be passed to the HTML to Jinja via a variable. what do you think?

jd
Автор

hey Great video, quick question, when i put a tab space behind try statement it throws an error, but when i put four spaces it works? DO you know why that might be happening because i have used tab for indentation in python all the time

mohitjain
Автор

why not put the try except in the if __name__ == "__main__" thing?

arjunbemarkar
Автор

what does the value carried by "e" parameter in page_not_found

penumarthinlgvsvamsi
Автор

it is possible to log the errors in an error file concurrently?

Arslanqadri
Автор

Hi Harrison

Do you do anything fancy to help search engines find your websites?....egI have read about using schema but it just looks annoying :)

darronpressley
Автор

are you simply copy/pasting stuff from Miguel's tutorial?

dimashur