Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with sentiment_fts table #6

Open
ghost opened this issue Mar 30, 2018 · 2 comments
Open

Error with sentiment_fts table #6

ghost opened this issue Mar 30, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 30, 2018

I found a error during running twitter_stream.py and dev_server.py like this:
pandas.io.sql.DatabaseError: Execution failed on sql 'SELECT sentiment.* FROM sentiment_fts fts LEFT JOIN sentiment ON fts.rowid = sentiment.id WHERE fts.sentiment_fts MATCH ? ORDER BY fts.rowid DESC LIMIT 10': no such table: sentiment_fts

I supposed the cause of this error is in twitter_stream.py when it was creating sentiment_fts table, but I cannot find anything wrong with it. Could anyone please help me with it?
fts5 was already enabled.

@daniel-kukiela
Copy link
Collaborator

What operating system are you using?
You need newest Python 3.6 on Windows, and for Linux you have to update sqlite module (there is info about that in readme)

@stelaninja
Copy link

stelaninja commented Jan 1, 2020

I hade the same error running on a Mac with Python 3.8.

The solution was to add the current path to the code.

import os
import sys

# set chdir to current dir
sys.path.insert(0, os.path.realpath(os.path.dirname(__file__)))
os.chdir(os.path.realpath(os.path.dirname(__file__)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants