UnicodeDecodeError: ‘utf8‘ codec can‘t decode byte 0xb0 in position 0: invalid start byte
程序员文章站
2022-07-08 09:48:49
...
问题:pycharm运行以下python文件时报错
import flask
app = flask.Flask(__name__)
@app.route("/")
def hello():
return "你好"
@app.route("/hi")
def hi():
return "Hi,你好"
app.run()
UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xb0 in position 0: invalid start byte
解决方法:计算机去除中文,重启!!!
问题解决(亲测有效!!!):
上一篇: Android 自带的返回键功能
推荐阅读
-
RLException: Invalid <node> tag: ‘ascii‘ codec can‘t decode byte 0xe6报错
-
Anaconda中启动Python时的错误:UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 553
-
UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0xcb in position 260: ordinal not in range(128)
-
命令行调用python出现编码错误:UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0x9a in position 140 完美解决!
-
Python2.7更新pip:UnicodeDecodeError: 'ascii' codec can't decode byte 0xb7 in position 7: ordinal not in range(128)
-
Python “'ascii' codec can't decode byte 0xb0i in position 1” 的解决方法
-
真正解决Windows下UnicodeDecodeError: ‘gbk‘ codec can‘t decode byte 0xff in position 0错误的方法
-
当在命令行中执行virtualenv venv时报此错误:'utf-8' codec can't decode byte 0xd5 in position 38: invalid continuation by
-
UnicodeDecodeError: 'utf-8' codec can't decode byte in position : invalid continuation byte
-
【debug】UnicodeDecodeError: codec can't decode byte 0xbd in position 4: invalid start byte