SyntaxError: Non-ASCII character '\xc2' in file

Pythonweb2173 发布于 01/19 16:43
阅读 57
收藏 0

  File "/root/test/pymq.py", line 8
SyntaxError: Non-ASCII character '\xc2' in file /root/test/pymq.py on line 8, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
20/01/19 16:46:58 INFO util.ShutdownHookManager: Shutdown hook called
20/01/19 16:46:58 INFO util.ShutdownHookManager: Deleting directory /tmp/spark-2b1a020f-9011-460e-861f-31a28531f375
 

加载中
0
H
Hejs

在文件开头加上这一句

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

 

返回顶部
顶部

页面底部区域 foot.htm