問題

執行Prefect時,顯示以下錯誤訊息:

sqlite3.OperationalError: no such function: json_object
The above exception was the direct cause of the following exception:
......

解決方法

查詢資料庫版本最低需求

查詢Prefect官網,預設是使用SQLite,至少需SQLite 3.24版或以上版本,但Python 3.8內建為SQLite 2.6

更新Python的SQLite

首先先到SQLite官網,依您的作業系統下載對應的「Precompiled Binaries」。
將壓縮檔解壓縮後,將sqlite3.dll複製python的DLLs資料夾內取代舊版檔案

預設路徑是
C:\Users\USER\AppData\Local\Programs\Python\Python312\DLLs
其中312為Python版本,請依您的Python版本修改
#include <stdio.h>
int main(void)
{
  printf("Hello, world!\n");
  return 0;
}

2留言

<