You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\CAP_API\skcom-master> python -m skcom.samples.ticks
WARNING | 目前設定檔沒有加密, 建議您加密避免帳號外流
WARNING | 執行下列指令即可加密:
WARNING | python -m skcom.tools.cfenc
[12:10:48] INFO | 系統公告: SKReplyLib_OnReplyMessage:Announcement callback.
[12:11:11] INFO | 連線成功: nKind=3001, nCode=0
[12:11:13] INFO | 連線就緒: nKind=3003, nCode=0
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\CAP_API\skcom-master\skcom\samples\ticks.py", line 56, in <module>
asyncio.run(main())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\CAP_API\skcom-master\skcom\samples\ticks.py", line 53, in main
await qrcv.root_task()
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 162, in root_task
await asyncio.gather(
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 242, in request
self.request_kline()
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 338, in request_kline
'name': fix_encoding(p_stock.bstrStockName),
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 32, in fix_encoding
newstr = bytes(map(ord, thestr)).decode('cp950')
ValueError: bytes must be in range(0, 256)
PS C:\CAP_API\skcom-master>
PS C:\CAP_API\skcom-master> python -m skcom.samples.kline
WARNING | 目前設定檔沒有加密, 建議您加密避免帳號外流
WARNING | 執行下列指令即可加密:
WARNING | python -m skcom.tools.cfenc
[12:01:04] INFO | 系統公告: SKReplyLib_OnReplyMessage:Announcement callback.
[12:01:26] INFO | 連線成功: nKind=3001, nCode=0
[12:01:28] INFO | 連線就緒: nKind=3003, nCode=0
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\CAP_API\skcom-master\skcom\samples\kline.py", line 44, in <module>
asyncio.run(main())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\CAP_API\skcom-master\skcom\samples\kline.py", line 41, in main
await qrcv.root_task()
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 162, in root_task
await asyncio.gather(
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 242, in request
self.request_kline()
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 338, in request_kline
'name': fix_encoding(p_stock.bstrStockName),
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 32, in fix_encoding
newstr = bytes(map(ord, thestr)).decode('cp950')
ValueError: bytes must be in range(0, 256)
PS C:\CAP_API\skcom-master>
PS C:\CAP_API\skcom-master> python -m skcom.samples.bot
WARNING | 目前設定檔沒有加密, 建議您加密避免帳號外流
WARNING | 執行下列指令即可加密:
WARNING | python -m skcom.tools.cfenc
[12:12:08] INFO | 系統公告: SKReplyLib_OnReplyMessage:Announcement callback.
[12:12:30] INFO | 連線成功: nKind=3001, nCode=0
[12:12:32] INFO | 連線就緒: nKind=3003, nCode=0
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\CAP_API\skcom-master\skcom\samples\bot.py", line 213, in <module>
main()
File "C:\CAP_API\skcom-master\skcom\samples\bot.py", line 210, in main
StockBot().start()
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 115, in start
asyncio.run(self.root_task())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2544.0_x64__qbz5n2kfra8p0\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 162, in root_task
await asyncio.gather(
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 242, in request
self.request_kline()
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 338, in request_kline
'name': fix_encoding(p_stock.bstrStockName),
File "C:\CAP_API\skcom-master\skcom\asyncrecv.py", line 32, in fix_encoding
newstr = bytes(map(ord, thestr)).decode('cp950')
ValueError: bytes must be in range(0, 256)
PS C:\CAP_API\skcom-master>
問題說明
執行範例報錯
今天五月有人提出相同問題,不過下方沒有看到其他進展,加上系統版本不同,在此重新提問,如果叨擾還望海涵
完全新手衷心感謝有這麼完整的分享,萬分感恩!!
問題重現方法
請用下列格式告訴我該如何重現問題
python -m skcom.samples.ticks
python -m skcom.samples.kline
python -m skcom.samples.bot
輸出訊息
請務必貼純文字訊息, 而不要貼螢幕截圖, 我比較方便複製相關文字
環境資訊
The text was updated successfully, but these errors were encountered: