質問編集履歴
2
説明付け加え
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,13 @@
|
|
1
|
-
|
1
|
+
Windows使用でPython,Django,pipenvインストール。
|
2
|
+
VScode上でこのサイト↓を
|
2
3
|
```
|
4
|
+
def post_list(request):
|
5
|
+
return render(request, 'blog/post_list.html')
|
6
|
+
|
7
|
+
```
|
8
|
+
表示させようすると、
|
9
|
+
下記のエラーが表示されます。
|
10
|
+
```
|
3
11
|
UnicodeDecodeError at /
|
4
12
|
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
|
5
13
|
|
@@ -49,4 +57,5 @@
|
|
49
57
|
self.buffer = data[consumed:]
|
50
58
|
return result
|
51
59
|
```
|
60
|
+
どうしたらよいのでしょうか? 'utf-8'の何か設定を再度しなければいけないのでしょうか?
|
52
|
-
|
61
|
+
アドバイスよろしくお願いいたします。
|
1
題名の変更
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
Python:エラー 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
|
body
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Pythonでファイルを作りブラウザにアクセスすると下記のようなエラーが表示されます。
|
2
2
|
```
|
3
|
-
|
3
|
+
UnicodeDecodeError at /
|
4
|
-
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
|
4
|
+
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
|
5
5
|
|
6
6
|
Request Method: GET
|
7
7
|
Request URL: http://127.0.0.1:8000/
|