VeighNa量化社区
你的开源社区量化交易平台
Member
加入于:
帖子: 23
声望: 0

看到社区里出了一个webtrader app,在win11里运行良好,想放到外网服务器上,结果出错如下,请帮忙看看,多谢!

description

INFO: Will watch for changes in these directories: ['/root']

INFO: Uvicorn running on http://0.0.0.0:8899 (Press CTRL+C to quit)
INFO: Started reloader process [1200428] using statreload

/root/./vnpy/trader/setting.py:30: PytzUsageWarning: The zone attribute is specific to pytz's interface; please migrate to a new time zone provider. For more details on how to do so, see https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html
"database.timezone": get_localzone().zone,

Process SpawnProcess-1:

Traceback (most recent call last):
File "/root/miniconda3/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/root/miniconda3/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/root/miniconda3/lib/python3.9/site-packages/uvicorn/subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
File "/root/miniconda3/lib/python3.9/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
File "/root/miniconda3/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/root/miniconda3/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/root/miniconda3/lib/python3.9/site-packages/uvicorn/server.py", line 67, in serve
config.load()
File "/root/miniconda3/lib/python3.9/site-packages/uvicorn/config.py", line 458, in load
self.loaded_app = import_from_string(self.app)
File "/root/miniconda3/lib/python3.9/site-packages/uvicorn/importer.py", line 21, in import_from_string
module = importlib.import_module(module_str)
File "/root/miniconda3/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/root/miniconda3/lib/python3.9/site-packages/vnpy_webtrader/web.py", line 41, in <module>
USERNAME = setting["username"] # 鐢ㄦ埛鍚?KeyError: 'username'

Member
avatar
加入于:
帖子: 1638
声望: 119

看报错是参数传递的问题,但是比较底层,去Github开个issue吧

© 2015-2022 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号

沪公网安备 31011502017034号

【用户协议】
【隐私政策】
【免责条款】