View Single Post
Old 12-20-2023, 07:16 AM   #567
bigwoof
Connoisseur
bigwoof began at the beginning.
 
Posts: 88
Karma: 18
Join Date: Jun 2020
Device: Boox Note Air3, don't use my kindle anymore
found another bug that needs fixing. The sqlite DB barfs when too many books are added at one go. the error is

Code:
 { "Error": "Failed to execute handler: /usr/lib/ccat/change.lua:2201: /usr/lib/ccat/change.lua:2045: {"http_status_code":400,"sqlite3_msg":"too many SQL variables","sqlite3_code":4}" }
The code is in cc_update.py

Code:
            r = requests.post("http://127.0.0.1:9101/change",
                              data=json.dumps(full_command),
                              headers={'AuthToken': self.session_token, 'content-type
                              proxies={'no': 'pass'})
I'll need to break the data up into groups of maybe 400 and submit that bit by bit

I'm not great at JSON and even worse at SQL so if someone can crank this up in 5 minutes (some folks I know could!), please go ahead. otherwise I'll fix this as a weekend project sometime.. :-)

Last edited by bigwoof; 12-20-2023 at 07:47 AM.
bigwoof is offline   Reply With Quote