Giter Club home page Giter Club logo

Comments (8)

foolcage avatar foolcage commented on May 14, 2024

“too many SQL variables” 错误会在某些sqlite版本出现,这是sqlite 参数长度限制 的设置。
可以百度一下解决办法。

PS:目前mac,linux下暂时没碰到。根本原因是在更新数据时,传入长串的id判断是否重复导致。

from zvt.

scanfyu avatar scanfyu commented on May 14, 2024

目前测试win环境下会遇到该问题,主要原因是参数过多超过了SQLite允许的上线(999)。

参见:https://stackoverflow.com/questions/26971050/sqlalchemy-sqlite-too-many-sql-variables

from zvt.

foolcage avatar foolcage commented on May 14, 2024

@scanfyu 可以做个判断,win下df_to_db把sub_size设得足够足够小。。

from zvt.

foolcage avatar foolcage commented on May 14, 2024

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.

ranglang avatar ranglang commented on May 14, 2024

➜ ~ sqlite3
SQLite version 3.24.0 建议增加版本建议 centos 7自带的sqlite就不行 @foolcage

from zvt.

coolsnake avatar coolsnake commented on May 14, 2024

将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.

Leo-zhanglj avatar Leo-zhanglj commented on May 14, 2024

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.

epoches avatar epoches commented on May 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.