root@qinglong:/ql/data/scripts/Litre-WU_Sign $ uvicorn sign:app --host 0.0.0.0 --port 8081
Traceback (most recent call last):
File "/usr/local/bin/uvicorn", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(args, kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 416, in main
run(
File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 587, in run
server.run()
File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in serve
config.load()
File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 467, in load
self.loaded_app = import_from_string(self.app)
File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 879, in exec_module
File "", line 1017, in get_code
File "", line 947, in source_to_code
File "", line 241, in _call_with_frames_removed
File "/ql/data/scripts/Litre-WU_Sign/sign.py", line 72
except Exception as e:
^
IndentationError: expected an indented block after 'try' statement on line 68
root@qinglong:/ql/data/scripts/Litre-WU_Sign $
安装好依赖后(执行pip install uvicorn fastapi httpx loguru diskcache apscheduler redis -i https://pypi.doubanio.com/simple/ 安装依赖包),在sign.py同级目录执行 uvicorn sign:app --host 0.0.0.0 --port 8081 命令 出错!!!
root@qinglong:/ql/data/scripts/Litre-WU_Sign $ uvicorn sign:app --host 0.0.0.0 --port 8081 Traceback (most recent call last): File "/usr/local/bin/uvicorn", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(args, kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 416, in main
run(
File "/usr/local/lib/python3.10/site-packages/uvicorn/main.py", line 587, in run
server.run()
File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/local/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/usr/local/lib/python3.10/site-packages/uvicorn/server.py", line 68, in serve
config.load()
File "/usr/local/lib/python3.10/site-packages/uvicorn/config.py", line 467, in load
self.loaded_app = import_from_string(self.app)
File "/usr/local/lib/python3.10/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 879, in exec_module
File "", line 1017, in get_code
File "", line 947, in source_to_code
File "", line 241, in _call_with_frames_removed
File "/ql/data/scripts/Litre-WU_Sign/sign.py", line 72
except Exception as e:
^
IndentationError: expected an indented block after 'try' statement on line 68
root@qinglong:/ql/data/scripts/Litre-WU_Sign $
作者能否做个青龙面板能用的版本呢?