D1: Use REST API instead of Python module #14

Open
opened 2025-10-16 22:27:00 -07:00 by swee · 0 comments
Owner

There is a lot of version mismatching with the cloudflare module and currently the D1 module is broken

Traceback (most recent call last):
  File "/home/swee/Git/IRCat/modules/pawserv.py", line 46, in command
    query = self.sql.chanserv_details(channel)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/swee/Git/IRCat/modules/cfd1.py", line 61, in chanserv_details
    e = self.cfexec("SELECT * FROM chanserv WHERE name=?;", [channel])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/swee/Git/IRCat/modules/cfd1.py", line 27, in cfexec
    return query[0].results
           ~~~~~^^^
TypeError: 'SyncSinglePage[QueryResult]' object is not subscriptable
There is a lot of version mismatching with the `cloudflare` module and currently the D1 module is broken ``` Traceback (most recent call last): File "/home/swee/Git/IRCat/modules/pawserv.py", line 46, in command query = self.sql.chanserv_details(channel) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/swee/Git/IRCat/modules/cfd1.py", line 61, in chanserv_details e = self.cfexec("SELECT * FROM chanserv WHERE name=?;", [channel]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/swee/Git/IRCat/modules/cfd1.py", line 27, in cfexec return query[0].results ~~~~~^^^ TypeError: 'SyncSinglePage[QueryResult]' object is not subscriptable ```
swee self-assigned this 2025-10-16 22:27:01 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: swee/IRCat#14
No description provided.