Skip to content

Syntax error in SQL statement with psycopg2 #8

@ciusji

Description

@ciusji

envs: (MacOS m1 chip)
python3.9
psycopg2-binary==2.8.6

Guinsoo:
mode: postgresql

Error details:
2022-11-20 10:58:40,006:ERROR:flask_appbuilder.security.sqla.manager:Add Role: (psycopg2.errors.SyntaxErrorOrAccessRuleViolation) Syntax error in SQL statement "INSERT INTO ab_role (id, name) VALUES (nextval('ab_role_id_seq'), E'Admin') []RETURNING ab_role.id"; SQL statement:
INSERT INTO ab_role (id, name) VALUES (nextval('ab_role_id_seq'), E'Admin') RETURNING ab_role.id [42000-219]
DETAIL: org.guinsoo.jdbc.JdbcSQLSyntaxErrorException: Syntax error in SQL statement "INSERT INTO ab_role (id, name) VALUES (nextval('ab_role_id_seq'), E'Admin') [
]RETURNING ab_role.id"; SQL statement:
INSERT INTO ab_role (id, name) VALUES (nextval('ab_role_id_seq'), E'Admin') RETURNING ab_role.id [42000-219]

[SQL: INSERT INTO ab_role (id, name) VALUES (nextval('ab_role_id_seq'), %(name)s) RETURNING ab_role.id]
[parameters: {'name': 'Admin'}]
(Background on this error at: http://sqlalche.me/e/13/f405)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions