teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

説明付け加え

2020/01/29 22:50

投稿

AtyAty
AtyAty

スコア9

title CHANGED
File without changes
body CHANGED
@@ -1,5 +1,13 @@
1
- Pythonファルを作りブラウザにアクセすると下記のようなエラが表示されます
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

題名の変更

2020/01/29 22:50

投稿

AtyAty
AtyAty

スコア9

title CHANGED
@@ -1,1 +1,1 @@
1
- UnicodeDecodeError at / 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
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
- **UnicodeDecodeError at /
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/