请问这个报错该如何解决?
PS C:\Windows\system32> pip install vnpy_ctptest==6.5.1.5
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting vnpy_ctptest==6.5.1.5
Using cached https://mirrors.aliyun.com/pypi/packages/b8/98/aef6385be9d433871c69b77586c47c77a70e9af5b2f7bedf9d9e5181fac9/vnpy_ctptest-6.5.1.5.ta
r.gz (6.3 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting importlib_metadata (from vnpy_ctptest==6.5.1.5)
Downloading https://mirrors.aliyun.com/pypi/packages/ff/94/64287b38c7de4c90683630338cf28f129decbba0a44f0c6db35a873c73c4/importlib_metadata-6.7.0
-py3-none-any.whl (22 kB)
Requirement already satisfied: zipp>=0.5 in c:\python38-32\lib\site-packages (from importlib_metadata->vnpy_ctptest==6.5.1.5) (3.15.0)
Building wheels for collected packages: vnpy_ctptest
Building wheel for vnpy_ctptest (setup.py): started
Building wheel for vnpy_ctptest (setup.py): finished with status 'error'
pip : error: subprocess-exited-with-error
所在位置 行:1 字符: 1
python setup.py bdist_wheel did not run successfully.
exit code: 1
[119 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\vnpy_ctptest
copying vnpy_ctptest__init.py -> build\lib.win32-3.8\vnpy_ctptest
creating build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\ctp_constant.py -> build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\init.py -> build\lib.win32-3.8\vnpy_ctptest\api
creating build\lib.win32-3.8\vnpy_ctptest\gateway
copying vnpy_ctptest\gateway\ctptest_gateway.py -> build\lib.win32-3.8\vnpy_ctptest\gateway
copying vnpy_ctptest\gateway\init.py -> build\lib.win32-3.8\vnpy_ctptest\gateway
running egg_info
writing vnpy_ctptest.egg-info\PKG-INFO
writing dependency_links to vnpy_ctptest.egg-info\dependency_links.txt
writing requirements to vnpy_ctptest.egg-info\requires.txt
writing top-level names to vnpy_ctptest.egg-info\top_level.txt
reading manifest file 'vnpy_ctptest.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '.pyd' under directory 'vnpy_ctptest'
writing manifest file 'vnpy_ctptest.egg-info\SOURCES.txt'
creating build\lib.win32-3.8\vnpy_ctptest\api\vnctp
creating build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\vnctpmd.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
creating build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\vnctptd.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\libthostmduserapi_se.so -> build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\libthosttraderapi_se.so -> build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\thostmduserapi_se.dll -> build\lib.win32-3.8\vnpy_ctptest\api
copying vnpy_ctptest\api\thosttraderapi_se.dll -> build\lib.win32-3.8\vnpy_ctptest\api
creating build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_header_define.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_header_function.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_header_on.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_header_process.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_function.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_module.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_on.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_process.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_switch.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_md_source_task.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_header_define.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_header_function.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_header_on.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_header_process.h -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_function.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_module.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_on.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_process.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_switch.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
copying vnpy_ctptest\api\generator\ctp_td_source_task.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\generator
creating build\lib.win32-3.8\vnpy_ctptest\api\include
creating build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
copying vnpy_ctptest\api\include\ctp\ThostFtdcMdApi.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
copying vnpy_ctptest\api\include\ctp\ThostFtdcTraderApi.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
copying vnpy_ctptest\api\include\ctp\ThostFtdcUserApiDataType.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
copying vnpy_ctptest\api\include\ctp\ThostFtdcUserApiStruct.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\ctp
creating build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\attr.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\buffer_info.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\cast.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\chrono.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\common.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\complex.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\eigen.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\embed.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\eval.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\functional.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\iostream.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\numpy.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\operators.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\options.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\pybind11.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\pytypes.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\stl.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
copying vnpy_ctptest\api\include\pybind11\stl_bind.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11
creating build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\class.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\common.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\descr.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\init.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\internals.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
copying vnpy_ctptest\api\include\pybind11\detail\typeid.h -> build\lib.win32-3.8\vnpy_ctptest\api\include\pybind11\detail
creating build\lib.win32-3.8\vnpy_ctptest\api\libs
copying vnpy_ctptest\api\libs\thostmduserapi_se.lib -> build\lib.win32-3.8\vnpy_ctptest\api\libs
copying vnpy_ctptest\api\libs\thosttraderapi_se.lib -> build\lib.win32-3.8\vnpy_ctptest\api\libs
copying vnpy_ctptest\api\vnctp\vnctp.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp
copying vnpy_ctptest\api\vnctp\vnctpmd\dllmain.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\stdafx.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\stdafx.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\targetver.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctpmd\vnctpmd.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctpmd
copying vnpy_ctptest\api\vnctp\vnctptd\dllmain.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\stdafx.cpp -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\stdafx.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\targetver.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
copying vnpy_ctptest\api\vnctp\vnctptd\vnctptd.h -> build\lib.win32-3.8\vnpy_ctptest\api\vnctp\vnctptd
running build_ext
building 'vnpy_ctptest.api.vnctptd' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\vnpy_ctptest
creating build\temp.win32-3.8\Release\vnpy_ctptest\api
creating build\temp.win32-3.8\Release\vnpy_ctptest\api\vnctp
creating build\temp.win32-3.8\Release\vnpy_ctptest\api\vnctp\vnctptd
D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I
vnpy_ctptest/api/include -Ivnpy_ctptest/api/vnctp -Ic:\python38-32\include -Ic:\python38-32\include "-ID:\Program Files\Microsoft Visual Studio\2
022\Community\VC\Tools\MSVC\14.35.32215\include" "-ID:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-ID:\Window
s Kits\10\include\10.0.22621.0\ucrt" "-ID:\Windows Kits\10\include\10.0.22621.0\um" "-ID:\Windows Kits\10\include\10.0.22621.0\shared" "-ID:\
Windows Kits\10\include\10.0.22621.0\winrt" "-ID:\Windows Kits\10\include\10.0.22621.0\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFX
SDK\4.8\include\um" /EHsc /Tpvnpy_ctptest/api/vnctp/vnctptd/vnctptd.cpp /Fobuild\temp.win32-3.8\Release\vnpy_ctptest/api/vnctp/vnctptd/vnctptd.ob
j -O2 -MT
cl: 命令行 warning D9025 :正在重写“/MD”(用“/MT”)
vnctptd.cpp
C:\Users\许鑫\AppData\Local\Temp\pip-install-nl1207wq\vnpy-ctptest_b579fc09a78245a18d72d4dc3c1bbff8\vnpy_ctptest\api\include\ctp\ThostFtdcUserApi
Struct.h(7950): warning $819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
C:\Users\许鑫\AppData\Local\Temp\pip-install-nl1207wq\vnpy-ctptest_b579fc09a78245a18d72d4dc3c1bbff8\vnpy_ctptest\api\include\ctp\ThostFtdcUserApi
Struct.h(9060): warning $819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
vnpy_ctptest/api/vnctp/vnctptd/vnctptd.cpp(11526): warning $996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s in
stead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
Running setup.py clean for vnpy_ctptest
vnpy_ctptest/api/vnctp\vnctp.h(117): warning $996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disa
ble deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
vnpy_ctptest/api/vnctp/vnctptd/vnctptd.cpp(8570): note: 查看对正在编译的函数 模板 实例化“void getString<11>(const pybind11::dict &,const char ,char (&)[11])”
的引用
D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /
MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:vnpy_ctptest/api/libs /LIBPATH:vnpy_ctptest/api /LIBPATH:c:\python38-32\libs /LIBPATH:c:\python38-32
\PCbuild\win32 "/LIBPATH:D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\lib\x86" "/LIBPATH:C:\Program Files (x
86)\Windows Kits\NETFXSDK\4.8\lib\um\x86" "/LIBPATH:D:\Windows Kits\10\lib\10.0.22621.0\ucrt\x86" "/LIBPATH:D:\Windows Kits\10\lib\10.0.22621.0\
\um\x86" thostmduserapi_se.lib thosttraderapi_se.lib /EXPORT:PyInit_vnctptd build\temp.win32-3.8\Release\vnpy_ctptest/api/vnctp/vnctptd/vnctptd.o
bj /OUT:build\lib.win32-3.8\vnpy_ctptest\api\vnctptd.cp38-win32.pyd /IMPLIB:build\temp.win32-3.8\Release\vnpy_ctptest/api/vnctp/vnctptd\vnctptd.c
p38-win32.lib
正在创建库 build\temp.win32-3.8\Release\vnpy_ctptest/api/vnctp/vnctptd\vnctptd.cp38-win32.lib 和对象 build\temp.win32-3.8\Release\vnpy_ctptest/api/vn
ctp/vnctptd\vnctptd.cp38-win32.exp
vnctptd.obj : error LNK2001: 无法解析的外部符号 "public: static class CThostFtdcTraderApi * cdecl CThostFtdcTraderApi::CreateFtdcTraderApi(char const
*)" (?CreateFtdcTraderApi@CThostFtdcTraderApi@@SAP$1@PBD@Z)
build\lib.win32-3.8\vnpy_ctptest\api\vnctptd.cp38-win32.pyd : fatal error LNK1120: 1 个无法解析的外部命令
error: command 'D:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x86\link.exe' failed
with exit status 1120
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for vnpy_ctptest
Failed to build vnpy_ctptest
ERROR: Could not build wheels for vnpy_ctptest, which is required to install pyproject.toml-based projects
xiaohe wrote:
你用的vnpy_ctptest版本是?期货公司给的评测api的版本是?
vnpy_ctptest版本是(测试6.6.7),期货公司给的评测api的版本是 6.3.15_20190220_tradeapi64_se_windows
MTF wrote:
直接替换dll后导致的吧,vnpy_ctp.api需要做重新编译
期货公司给的dll 和 lib,自己需要重新编译吗?
请教,在CTPTEST 成功链接后,每次3秒后就会自动闪退。是什么问题?日志如下:
2023-06-16 14:30:10 --------------------------------------------------
2023-06-16 14:30:10 VeighNa Trader进程启动
2023-06-16 14:30:16 2023-06-16 14:30:16,349 INFO: 交易服务器连接成功
2023-06-16 14:30:16 2023-06-16 14:30:16,359 INFO: 行情服务器连接成功
2023-06-16 14:30:16 2023-06-16 14:30:16,415 INFO: 行情服务器登录成功
2023-06-16 14:30:16 2023-06-16 14:30:16,649 INFO: 交易服务器授权验证成功
2023-06-16 14:30:16 2023-06-16 14:30:16,680 INFO: 交易服务器登录成功
2023-06-16 14:30:19 VeighNa Trader进程终止
解决了,是权限问题。
那么问题来了,如何自己删帖呢?
用VeighNa Station自带的python环境,如何正常更新和安装第三方库?
我使用VeighNa Station自带的python环境,总是报如下问题,这该如何解决?
python : ERROR: Exception:
所在位置 行:1 字符: 1
Traceback (most recent call last):
File "D:\veighna_studio\lib\site-packages\pip_internal\cli\base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
File "D:\veighna_studio\lib\site-packages\pip_internal\cli\req_command.py", line 247, in wrapper
return func(self, options, args)
File "D:\veighna_studio\lib\site-packages\pip_internal\commands\install.py", line 335, in run
build_tracker = self.enter_context(get_build_tracker())
File "D:\veighna_studio\lib\site-packages\pip_internal\cli\command_context.py", line 27, in enter_context
return self._main_context.enter_context(context_provider)
File "D:\veighna_studio\lib\contextlib.py", line 492, in enter_context
result = _cm_type.enter(cm)
File "D:\veighna_studio\lib\contextlib.py", line 135, in enter
return next(self.gen)
File "D:\veighna_studio\lib\site-packages\pip_internal\operations\build\build_tracker.py", line 46, in get_build_tracker
root = ctx.enter_context(TempDirectory(kind="build-tracker")).path
File "D:\veighna_studio\lib\site-packages\pip_internal\utils\temp_dir.py", line 125, in init
path = self._create(kind)
File "D:\veighna_studio\lib\site-packages\pip_internal\utils\temp_dir.py", line 164, in _create
path = os.path.realpath(tempfile.mkdtemp(prefix=f"pip-{kind}-"))
File "D:\veighna_studio\lib\tempfile.py", line 357, in mkdtemp
prefix, suffix, dir, output_type = _sanitize_params(prefix, suffix, dir)
File "D:\veighna_studio\lib\tempfile.py", line 126, in _sanitize_params
dir = gettempdir()
File "D:\veighna_studio\lib\tempfile.py", line 299, in gettempdir
return _os.fsdecode(_gettempdir())
File "D:\veighna_studio\lib\tempfile.py", line 292, in _gettempdir
tempdir = _get_default_tempdir()
File "D:\veighna_studio\lib\tempfile.py", line 223, in _get_default_tempdir
raise FileNotFoundError(_errno.ENOENT,
FileNotFoundError: [Errno 2] No usable temporary directory found in ['C:\Users\xx\AppData\Local\Temp', 'C:\Users\xx\AppData\Local\Temp', 'C:\Users\xx\AppData\Local\Temp', 'C:\Windows\Temp'
, 'c:\temp', 'c:\tmp', '\temp', '\tmp', 'C:\Users\xx']
[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip
请问vnpy有如下方法吗,我在自己的策略里如何得到相应的资金和合约数据(例如一跳多少钱)
------------------------------无限易的说明,拷过来用下------------------
VtPositioData -- 持仓数据类
在 ctaTemplate 文件中为 class VtPositioData
含义:持仓数据类,来源为交易所推送的持仓情况。
注意事项:通过 ctaTemplate 文件中定义的 getInvestorPostion 方法获取指定投资者账号的持仓情况,返回的结果是一个数组其中嵌套字典。如果只需要部分字段,可以通过数组的处理方式进行过虑。
VtAccountData -- 账户数据类
在 ctaTemplate 文件中为 class VtAccountData
含义:账户资金情况,来源为无限易自己实时统计计算的资金情况。
注意事项:通过 ctaTemplate 文件中定义的 get_investor_account 方法获取指定投资者账号的资金相关。相关字段数据与柜台推送的数据可能不一致。(统计方式,推送时间可能存在差异)。
VtContractData -- 合约数据类
在 ctaTemplate 文件中为 class VtContractData
含义:获取指定合约的详细信息。
注意事项:通过 ctaTemplate.py 文件中定义的 get_contract 方法获取指定交易所合约的详细情况。期权相关的包括期权的行权价,期权的类型,标的物合约代码。(后续待增加)。
zhaoyang wrote:
搞不明白这么多年了,vnpy在k线合成资金管理这些方面仍然一大堆坑
这两方面不突破,vnpy永远只是程序员的玩具
我安装好vnstudio后,利用安装的代码,按照 https://www.vnpy.com/forum/topic/4876-vn-pyshe-qu-jing-xuan-25-quan-shi-chang-qi-huo-shu-ju-pi-liang-he-zi-dong-geng-xin
方式写了自己的代码准备批量下载RQData数据(已开通会员,并且手动下载成功)
发现在如下代码:
def load_data(req):
data = rqdata_client.query_history(req)
database_manager.save_bar_data(data)
报错:
发生异常: TypeError
'NoneType' object is not subscriptable
File "C:\Users\Administrator\BatUpdateData\UpdateAllData.py", line 25, in load_data
database_manager.save_bar_data(data)
File "C:\Users\Administrator\BatUpdateData\UpdateAllData.py", line 37, in <module>
load_data(req)
关于这个问题,我有三个疑问:
1.首先我自己Debug,想进入rqdata.py打断点去看看,结果断点失效:Breakpoint in file excluded by filters.
Note: may be excluded because of "justMyCode" option (default == true).Try setting "justMyCode": false in the debug configuration (e.g., launch.json).
我想断点进源码,该如何设置?
我今天刚申请的账号
点击更新数据时,抛出如下异常,请问是什么问题?
Traceback (most recent call last):
File "c:\vnstudio\lib\site-packages\vnpy_datamanager\ui\widget.py", line 381, in update_data
overview.end
File "c:\vnstudio\lib\site-packages\vnpy_datamanager\engine.py", line 206, in download_bar_data
rqdata_client.init()
File "c:\vnstudio\lib\site-packages\vnpy\trader\rqdata.py", line 66, in init
df = rqdata_all_instruments()
File "c:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 139, in wrap
return func(args, **kwargs)
File "c:\vnstudio\lib\site-packages\rqdatac\services\basic.py", line 379, in all_instruments
ins_ret = filter(cond, get_instrument_list(market))
File "c:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 119, in wrapper
value = user_function(args, kwargs)
File "c:\vnstudio\lib\site-packages\rqdatac\services\basic.py", line 134, in _all_cached_instruments_list
return _all_instruments_list(market)
File "c:\vnstudio\lib\site-packages\rqdatac\services\basic.py", line 112, in _all_instruments_list
ins = [Instrument(i) for i in get_client().execute("all_instruments", market=market)]
File "c:\vnstudio\lib\site-packages\rqdatac\decorators.py", line 67, in wrap
return func(*args, kwargs)
File "c:\vnstudio\lib\site-packages\rqdatac\connection_pool.py", line 27, in execute
return conn.execute(method, *args, **kwargs)
File "rqdatac\connection.py", line 117, in rqdatac.connection.Connection.execute
File "rqdatac\connection.py", line 87, in rqdatac.connection.Connection._read_one_packet
rqdatac.share.errors.QuotaExceeded: Quota exceeded
请问阿里云服务器带宽需要多大的?