我将 CentOS-6 与 Python 3.8、PostgreSQL 12 和 PyGreSQL 5.2.2 一起使用。这是我尝试将数据插入数据库时遇到的错误。
>>> db.insert('settings', None, **data)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/site-packages/pg.py", line 2322, in insert
adapt = params.add
File "/usr/local/lib/python3.8/site-packages/pg.py", line 1667, in __getattr__
if self.db:
AttributeError: 'pg.Connection' object has no attribute 'escape_identifier'
谁能指出我出了什么问题?