Comments (8)
“too many SQL variables” 错误会在某些sqlite版本出现,这是sqlite 参数长度限制 的设置。
可以百度一下解决办法。
PS:目前mac,linux下暂时没碰到。根本原因是在更新数据时,传入长串的id判断是否重复导致。
from zvt.
目前测试win环境下会遇到该问题,主要原因是参数过多超过了SQLite允许的上线(999)。
参见:https://stackoverflow.com/questions/26971050/sqlalchemy-sqlite-too-many-sql-variables
from zvt.
@scanfyu 可以做个判断,win下df_to_db把sub_size设得足够足够小。。
from zvt.
sqlite variables的限制,可以通过命令行来更改:
➜ ~ sqlite3
SQLite version 3.24.0 2018-06-04 14:10:15
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .limit variable_number 400000
variable_number 400000
sqlite> .limit
length 2147483645
sql_length 1000000000
column 2000
expr_depth 1000
compound_select 500
vdbe_op 250000000
function_arg 127
attached 10
like_pattern_length 50000
variable_number 400000
trigger_depth 1000
worker_threads 0
from zvt.
➜ ~ sqlite3
SQLite version 3.24.0 建议增加版本建议 centos 7自带的sqlite就不行 @foolcage
from zvt.
将SQLite的版本升级到3.32.0以上即可解决。
windows下:
1、关闭anaconda里的程序;
2、下载sqlite3最新版
https://www.sqlite.org/download.html
sqlite-dll-win64-x64-3340100.zip(根据情况,选择相应版本,这里选择64位的)
sqlite-tools-win32-x86-3340100.zip
解压:sqlite3.dll,sqlite3.exe
3、打开:\Anaconda3\Library\bin
替换 sqlite3.dll,sqlite3.exe
from zvt.
MAC版本信息
requests == 2.20.1
SQLAlchemy == 1.4.20
pandas == 1.1.4
arrow == 0.11.0
tzlocal == 2.1
xlrd == 1.2.0
demjson == 2.2.4
marshmallow-sqlalchemy == 0.23.1
marshmallow == 3.2.2
plotly==4.12.0
dash==1.17.0
simplejson==3.16.0
jqdatapy==0.1.6
dash-bootstrap-components
dash_daq
sqlite版本
leo@Leo-MacBookPro ~ % sqlite3
SQLite version 3.32.3 2020-06-18 14:16:19
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
python版本3.7,遇到too many问题,后安装python3.9解决
from zvt.
sqlite variables的限制,可以通过命令行来更改:
➜ ~ sqlite3 SQLite version 3.24.0 2018-06-04 14:10:15 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .limit variable_number 400000 variable_number 400000 sqlite> .limit length 2147483645 sql_length 1000000000 column 2000 expr_depth 1000 compound_select 500 vdbe_op 250000000 function_arg 127 attached 10 like_pattern_length 50000 variable_number 400000 trigger_depth 1000 worker_threads 0
命令后没有修改数据,经过检查 python3.7无法解决,更换sqllite3也不行。windows下预编译版本sqlite variables的限制是无法改变的。
from zvt.
Related Issues (20)
- examples/recorders/joinquant_kdata_runner.py运行出错 HOT 3
- 请问是否有考虑增加一个分支去抓研报,如果能抓取市场全部的研报就好了
- 更新到最新运行Stock1dKdata.record_data更新出错了 HOT 1
- 下载了历史数据替换后,更新数据报错 HOT 1
- ETF详细数据
- 所有的交易测试都会报一个数据为空的错误,examples和tests里的都是这样
- 增加获取数据的API,类似record_data HOT 2
- 东财的行情数据获取有bug HOT 1
- cannot start project
- 更新板块数据时会报错 HOT 4
- 可以更新几个trader的example吗 HOT 1
- NameError: name 'get_finance_factor' is not defined HOT 1
- 东财数据无法获取 HOT 4
- 请教一下如何自己更新数据? HOT 1
- ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools' HOT 12
- 执行财务因子相关报错 HOT 1
- 请教 如何接入tushare的数据?
- QMT provider and Broker still can't work HOT 3
- ImportError: cannot import name 'html' from 'dash' HOT 1
- 哪位热心人士提供一份可以运行环境的PIP LIST? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zvt.