Z
Z
zeng1242021-10-26 21:10:31
Django
zeng124, 2021-10-26 21:10:31

Faced a problem on Django how to fix the error 'utf-8' codec can't decode byte 0xcf in position?

when running DJANGO in views.py, it handles the view.py
error

from django.shortcuts import render

def index(request):
    return render(request,'index.html')


the error itself looks like this:

Message = 'utf-8' codec can't decode byte 0xcf in position 78: invalid continuation byte
Source = C:\Users\kiril_000\source\repos\DjangoWebProject2\DjangoWebProject2\app\views.py
Stack trace :
File "C:\Users\kiril_000\source\repos\DjangoWebProject2\DjangoWebProject2\app\views.py", line 10, in index (Current frame)
return render(request,'index.html')

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arthur Samurai, 2021-10-26
@zvepb

Is there Cyrillic somewhere? In the name of the files in the project for example ? Or try changing the computer name without _000

A
Alan Gibizov, 2021-10-26
@phaggi

Did the official documentation help?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question