欢迎访问服务器技术网-www.fuwuqijishu.com

Python运行出现”SyntaxError: Non-ASCII character ‘\xe9′”问题

运维 fuwuqijishu 2年前 (2022-09-04) 127次浏览 0个评论 扫描二维码

在学习python脚本及运行的时候有提示”SyntaxError: Non-ASCII character ‘\xe9’ in file…”错误问题。然后通过查阅应该是编码问题导致的。于是找到解决办法。

# -*- coding: utf-8 -*-

在Python脚本文件顶部添加上面编码,然后保存后重新运行就没有提示错误。

喜欢 (0)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

Warning: error_log(/www/wwwroot/fuwiqijishu/wp-content/plugins/spider-analyser/#log/log-0208.txt): failed to open stream: No such file or directory in /www/wwwroot/fuwiqijishu/wp-content/plugins/spider-analyser/spider.class.php on line 2900