- 帖子
- 4
- 精华
- 0
- 积分
- 14
- 阅读权限
- 10
- 注册时间
- 2017-8-30
- 最后登录
- 2017-9-4
|
小白森 发表于 2017-8-30 15:09
图片上传了,显示不了。下面是代码和报错的内容。
#-*-coding:utf-8 -*-
import urllib2
city.py之前被我移到了另一个文件夹中,所以报错
Traceback (most recent call last):
File "C:\Users\feiwen_fan\Desktop\weather-fail.py", line 5, in <module>
from city import city
ImportError: No module named city
>>>
我把文件移到同一个路径下,报错
Traceback (most recent call last):
File "C:\Users\feiwen_fan\Desktop\weather-fail.py", line 6, in <module>
from city import city
File "C:\Users\feiwen_fan\Desktop\city.py", line 2
SyntaxError: Non-ASCII character '\xe5' in file C:\Users\feiwen_fan\Desktop\city.py on line 2, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
>>> |
|