## Solution

Redefine function org-font-lock-ensure. Add the following code snippet to init.el and execute it to solve the problem:

## Hack log

I find that if there is no source code blocks in the content, then org-html-export-as-html works properly. So I guess the problem occurred during exporting source code blocks to HTML. M-x toggle-debug-on-error (to prints a backtrace when an error happens in Emacs). Then create a very simple org-mode file which only contains a python code block:

M-x org-html-export-as-html, here is the Backtrace (unimportant parts are omitted):

The problem was in org-font-lock-ensure

Stop exploration here (it might just be a bug of org-mode), just redefine org-font-lock-ensure: