質問編集履歴

5

詳細の追加

2020/07/29 15:02

投稿

law
law

スコア12

test CHANGED
File without changes
test CHANGED
@@ -28,8 +28,6 @@
28
28
 
29
29
  ```
30
30
 
31
- ```
32
-
33
31
  で実行したところ、
34
32
 
35
33
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte
@@ -45,6 +43,8 @@
45
43
 
46
44
 
47
45
  ```error
46
+
47
+
48
48
 
49
49
  PS C:\Users\programming\python> & C:/Users/AppData/Local/Programs/Python/Python38/python.exe c:/Users/programming/python/hello_flask.py
50
50
 
@@ -99,3 +99,5 @@
99
99
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte
100
100
 
101
101
  ```
102
+
103
+ ```

4

詳細の追加

2020/07/29 15:02

投稿

law
law

スコア12

test CHANGED
File without changes
test CHANGED
@@ -43,6 +43,8 @@
43
43
  実行結果です。
44
44
 
45
45
 
46
+
47
+ ```error
46
48
 
47
49
  PS C:\Users\programming\python> & C:/Users/AppData/Local/Programs/Python/Python38/python.exe c:/Users/programming/python/hello_flask.py
48
50
 
@@ -95,3 +97,5 @@
95
97
  hostname, aliases, ipaddrs = gethostbyaddr(name)
96
98
 
97
99
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte
100
+
101
+ ```

3

詳細の追加

2020/07/29 15:01

投稿

law
law

スコア12

test CHANGED
File without changes
test CHANGED
@@ -39,6 +39,10 @@
39
39
  原因と解決方法を教えてください。
40
40
 
41
41
  python3.8.3dで、osはwindows10,hello_flask.pyというファイルを作成しvscodeで実行しました。
42
+
43
+ 実行結果です。
44
+
45
+
42
46
 
43
47
  PS C:\Users\programming\python> & C:/Users/AppData/Local/Programs/Python/Python38/python.exe c:/Users/programming/python/hello_flask.py
44
48
 

2

詳細の追加

2020/07/29 14:57

投稿

law
law

スコア12

test CHANGED
File without changes
test CHANGED
@@ -39,3 +39,55 @@
39
39
  原因と解決方法を教えてください。
40
40
 
41
41
  python3.8.3dで、osはwindows10,hello_flask.pyというファイルを作成しvscodeで実行しました。
42
+
43
+ PS C:\Users\programming\python> & C:/Users/AppData/Local/Programs/Python/Python38/python.exe c:/Users/programming/python/hello_flask.py
44
+
45
+ * Serving Flask app "hello_flask" (lazy loading)
46
+
47
+ * Environment: production
48
+
49
+ WARNING: This is a development server. Do not use it in a production deployment.
50
+
51
+ Use a production WSGI server instead.
52
+
53
+ * Debug mode: off
54
+
55
+ Traceback (most recent call last):
56
+
57
+ File "c:/Users/programming/python/hello_flask.py", line 10, in <module>
58
+
59
+ app.run()
60
+
61
+ File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\flask\app.py", line 990, in run
62
+
63
+ run_simple(host, port, self, **options)
64
+
65
+ File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\werkzeug\serving.py", line 1052, in run_simple
66
+
67
+ inner()
68
+
69
+ File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\werkzeug\serving.py", line 996, in inner
70
+
71
+ srv = make_server(
72
+
73
+ File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\werkzeug\serving.py", line 847, in make_server
74
+
75
+ return ThreadedWSGIServer(
76
+
77
+ File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\werkzeug\serving.py", line 740, in __init__
78
+
79
+ HTTPServer.__init__(self, server_address, handler)
80
+
81
+ File "C:\Users\AppData\Local\Programs\Python\Python38\lib\socketserver.py", line 452, in __init__
82
+
83
+ self.server_bind()
84
+
85
+ File "C:\Users\AppData\Local\Programs\Python\Python38\lib\http\server.py", line 140, in server_bind
86
+
87
+ self.server_name = socket.getfqdn(host)
88
+
89
+ File "C:\Users\AppData\Local\Programs\Python\Python38\lib\socket.py", line 756, in getfqdn
90
+
91
+ hostname, aliases, ipaddrs = gethostbyaddr(name)
92
+
93
+ UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte

1

詳細の追加

2020/07/29 14:57

投稿

law
law

スコア12

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,10 @@
1
1
  flaskのもっとも簡単なプログラムを実行しようとしたのですが、エラーが出ます。
2
2
 
3
3
  プログラムは
4
+
5
+
6
+
7
+ ```python
4
8
 
5
9
  from flask import Flask
6
10
 
@@ -9,6 +13,8 @@
9
13
 
10
14
 
11
15
  @app.route('/')
16
+
17
+
12
18
 
13
19
  def hello_world():
14
20
 
@@ -20,12 +26,16 @@
20
26
 
21
27
  app.run()
22
28
 
29
+ ```
30
+
31
+ ```
32
+
23
33
  で実行したところ、
24
34
 
25
35
  UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 0: invalid start byte
26
36
 
27
37
  という表示が出ました。
28
38
 
29
- 構築環境はvscodeです
39
+ 原因と解決方法を教えてください
30
40
 
31
- 原因解決方法教えてください
41
+ python3.8.3dで、osはwindows10,hello_flask.pyいうファイル作成しvscodeで実行しました