请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

UnicodeDecodeError:

Traceback (most recent call last):

  File "C:\python36\Scripts\venv\lib\site-packages\flask\app.py", line 1997, in __call__

    return self.wsgi_app(environ, start_response)

  File "C:\python36\Scripts\venv\lib\site-packages\flask\app.py", line 1985, in wsgi_app

    response = self.handle_exception(e)

  File "C:\python36\Scripts\venv\lib\site-packages\flask\app.py", line 1540, in handle_exception

    reraise(exc_type, exc_value, tb)

  File "C:\python36\Scripts\venv\lib\site-packages\flask\_compat.py", line 33, in reraise

    raise value

  File "C:\python36\Scripts\venv\lib\site-packages\flask\app.py", line 1982, in wsgi_app

    response = self.full_dispatch_request()

  File "C:\python36\Scripts\venv\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request

    rv = self.handle_user_exception(e)

  File "C:\python36\Scripts\venv\lib\site-packages\flask\app.py", line 1517, in handle_user_exception

    reraise(exc_type, exc_value, tb)

  File "C:\python36\Scripts\venv\lib\site-packages\flask\_compat.py", line 33, in reraise

    raise value

  File "C:\python36\Scripts\venv\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request

    rv = self.dispatch_request()

  File "C:\python36\Scripts\venv\lib\site-packages\flask\app.py", line 1598, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)

  File "E:\movie_venv\app\home\views.py", line 52, in index

    return render_template('home/index.html')

  File "C:\python36\Scripts\venv\lib\site-packages\flask\templating.py", line 133, in render_template

    return _render(ctx.app.jinja_env.get_or_select_template(template_name_or_list),

  File "C:\python36\Scripts\venv\lib\site-packages\jinja2\environment.py", line 869, in get_or_select_template

    return self.get_template(template_name_or_list, parent, globals)

  File "C:\python36\Scripts\venv\lib\site-packages\jinja2\environment.py", line 830, in get_template

    return self._load_template(name, self.make_globals(globals))

  File "C:\python36\Scripts\venv\lib\site-packages\jinja2\environment.py", line 804, in _load_template

    template = self.loader.load(self, name, globals)

  File "C:\python36\Scripts\venv\lib\site-packages\jinja2\loaders.py", line 113, in load

    source, filename, uptodate = self.get_source(environment, name)

  File "C:\python36\Scripts\venv\lib\site-packages\flask\templating.py", line 57, in get_source

    return self._get_source_fast(environment, template)

  File "C:\python36\Scripts\venv\lib\site-packages\flask\templating.py", line 82, in _get_source_fast

    return loader.get_source(environment, template)

  File "C:\python36\Scripts\venv\lib\site-packages\jinja2\loaders.py", line 175, in get_source

    contents = f.read().decode(self.encoding)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 59: invalid continuation byte

这章代码我完全照着打的啊,报这个错误

正在回答 回答被采纳积分+3

1回答

提问者 Stormdige 2018-09-04 21:35:53

5-5那一章啊,我别的页面都没问题,就这个页面,显示这个错误,求帮助啊,,,我查了我那里的

  File "E:\movie_venv\app\home\views.py", line 52, in index

    return render_template('home/index.html')

这一行并没有写错啊,,

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信