Skip to content

Bug: sqlite: bad parameter or other api misuse #10

Open
@flleeppyy

Description

@flleeppyy

Before You Begin

Before proceeding, please make sure to follow these steps:

  • I have checked for similar issues in the project's issue tracker.
  • I have searched closed issues to see if a similar problem was reported
    before.

Issue Details

Start by creating a descriptive title for the issue. This helps us understand
the problem quickly.

Description

Downloading a sticker pack fails with the message "sqlite3.InterfaceError: bad parameter or other API misuse"

Pack: https://t.me/addstickers/AnimeXOXO

Expected Behavior

Download to succeed

Actual Behavior

➜  tstickers-2025 tstickers -p https://t.me/addstickers/AnimeXOXO
INFO     | ------------------------------------------------------------
INFO     | Starting to scrape "AnimeXOXO" ..
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/bin/tstickers", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/tstickers/cli.py", line 115, in cli
    _ = downloader.downloadPack(pack)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/tstickers/manager.py", line 215, in downloadPack
    stickerPack = self.getPack(packName)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/tstickers/manager.py", line 184, in getPack
    files = [i.result() for i in as_completed(futures)]
             ^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/data/data/com.termux/files/usr/lib/python3.12/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/tstickers/manager.py", line 150, in getSticker
    info = self.doAPIReq("getFile", {"file_id": fileData["file_id"]})
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/tstickers/manager.py", line 125, in doAPIReq
    res = self.session.get(f"{self.api}{function}{urlParams}")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/requests_cache/session.py", line 127, in get
    return self.request('GET', url, params=params, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/requests_cache/session.py", line 183, in request
    return super().request(method, url, *args, headers=headers, **kwargs)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/requests_cache/session.py", line 218, in send
    cached_response = self.cache.get_response(actions.cache_key)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/requests_cache/backends/base.py", line 77, in get_response
    response = self.responses.get(key)
               ^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen _collections_abc>", line 807, in get
  File "/data/data/com.termux/files/usr/lib/python3.12/site-packages/requests_cache/backends/sqlite.py", line 312, in __getitem__
    cur = con.execute(f'SELECT value FROM {self.table_name} WHERE key=?', (key,))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sqlite3.InterfaceError: bad parameter or other API misuse
➜  tstickers-2025 /

System Information

Please provide the following additional information about your system or
environment:

  • Operating System (OS): Android 15,
  • Project Version (if applicable): 2025
Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=4933
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://mirror.fcix.net/termux/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://mirror.fcix.net/termux/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.45.0
Android version:
15
Kernel build information:
Linux localhost 5.4.286-qgki-g2d67a7347334 #1 SMP PREEMPT Wed Jan 1 05:00:49 UTC 2025 aarch64 Android
Device manufacturer:
Sony
Device model:
Xperia 1 III
Supported ABIs:
SUPPORTED_ABIS: arm64-v8a,armeabi-v7a,armeabi
SUPPORTED_32_BIT_ABIS: armeabi-v7a,armeabi
SUPPORTED_64_BIT_ABIS: arm64-v8a
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.x11 versionCode:14
com.termux.api versionCode:51

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions