You have to encode the file name!
file_url = 'file://' + urllib.parse.quote(os.path.realpath('test.html'))
You have to encode the file name!