AskXML
AskXML copied to clipboard
Getting an error when running a query: sqlite3.OperationalError: unrecognized token
I am trying to query a stack overflow dump. When I run my query, I get the following error. sqlite3.OperationalError: unrecognized token: "'DO NOT USE THIS TAG AS A GENERIC SECURITY TAG!!
My code is below.
from askxml import AskXML
conn = AskXML('posts.xml')
c = conn.cursor()
qs='SELECT postId from POSTS where PostTypeId=2'
answers = c.execute(qs)
for record in answers.fetchall():
print(record)
c.close()
I am using python version 3.6 on ubuntu version 18. Could this be the problem?