Closed Phizilion closed 3 years ago
@Phizilion, I guess this problem might arise due to python3.8, highly recommend update up to python3.9. This will help avoid future compatibility issues.
I have no any ideas why it can't find default PRAGMA_TABLE_INFO, but I found this answer by @MKleusberg
The pragma_table_info(...) syntax is indeed valid. Here is some information on it. There are two interesting notes there:
- This feature is experimental and is subject to change. Further documentation will become available if and when the table-valued functions for PRAGMAs feature becomes officially supported.
- The table-valued functions for PRAGMA feature was added in SQLite version 3.16.0 (2017-01-02). Prior versions of SQLite cannot use this feature.
I can confirm the latter. On my Linux system I have SQLCipher 3.4.1 which is based on SQLite 3.15.2 and doesn't support the pragma_xxx syntax. When I'm switching to vanilla SQLite which is version 3.26 the query runs just fine.
columns = self.execute(f"SELECT name FROM PRAGMA_TABLE_INFO('{table}')")
Anyway I made fix for this issue, please update up to sqllex==0.1.9.2
and let me know is it fixed or not. (And update python!)
yes, this problem does not arise anymore. Right now I cannot use python 3.9, but as soon as something changes, I will write here
i wanted to run my code to server however i got this error. The code works on my computer, so it might be the server
My computer is on Windows 10, the server is using CentOS 7 Python 3.8