Thanks to visit codestin.com
Credit goes to github.com

Skip to content

2.1.12升级到3.0.0后 QuoteContext.watchlist 异常 #596

@eiffelcn

Description

@eiffelcn

问题描述

longport== 2.1.12时,调用一切正常。
通过pip install -U longport 升级到longport==3.0.0后,调用watchlist会抛出异常,不符合预期。

代码例子

import longport.openapi as lb
lbqc = lb.QuoteContext(lb.Config.from_env())
ww = lbqc.watchlist()
print(len(ww))

错误信息或结果截图

Traceback (most recent call last):
File "/home/eiffelcn/test/test_wl.py", line 3, in
ww = lbqc.watchlist()
^^^^^^^^^^^^^^^^
longport.OpenApiException: OpenApiException: deserialize response body error: a character literal was not valid at line 1 column 216

你的环境信息

  • 操作系统: WSL
  • 开发语言: Python 3.12
  • SDK 版本号:3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions