python3 執行sanic報錯

2021-07-25 19:19:24 字數 1101 閱讀 8029

python3執行 sanic的時候報錯

d:\python>python web.py

2017-01-04 00:04:56,851: info: goin' fast @

2017-01-04 00:04:56,853: error: experienced exception while trying to serve

traceback (most recent call last):

file "d:\software\python\lib\site-packages\sanic-0.1.9-py3.5.egg\sanic\sanic.p

y", line 304, in run

serve(**server_settings)

file "d:\software\python\lib\site-packages\sanic-0.1.9-py3.5.egg\sanic\server.

py", line 290, in serve

loop.add_signal_handler(_signal, loop.stop)

file "d:\software\python\lib\asyncio\events.py", line 475, in add_signal_handl

erraise notimplementederror

notimplementederror

這是**縮排有問題,檢查一下**

但是在執行python web的時候,還是會出問題:

網上說用:

然而並沒有什麼用,因為在python3.5裡面根本就沒有******httpserver

******httpserver 被http.server替代了,所以我們應該用:

>]這個啟動起來我們訪問本地:

這時候顯示的都是源**

說明我們的伺服器起來了

python3執行時候報錯集錦 讀取檔案報錯

1 關於讀取檔案報錯 命令執行到cf.read cfpath 出現如下報錯 unicodedecodeerror gbk codec can t decode byte 0xa0 in position 16 illegal multibyte sequence 1 author lsj2 vers...

python3 計算python指令碼的執行時間

首先說一下我遇到的坑,生產上遇到的問題,我排程python指令碼執行並監控這個程序,python指令碼執行時間遠遠大於python指令碼中自己統計的程式執行時間。監控python指令碼執行的時間是36個小時,而python指令碼中統計自己執行的時間是4個小時左右。問題暴漏之後首先想到的是linux出...

python3 切片 python3 切片

取乙個list或tuple的部分元素是非常常見的操作。比如,乙個list如下 l michael sarah tracy bob jack 取前3個元素,應該怎麼做?笨辦法 l 0 l 1 l 2 michael sarah tracy 之所以是笨辦法是因為擴充套件一下,取前n個元素就沒轍了。取前n...