-
Notifications
You must be signed in to change notification settings - Fork 63
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
bdb.execute(sql) fails but bdb.sql_execute(sql) succeeds on SELECT #484
Comments
Can you share gapminder.bdb, or the results of the initial SELECT, or a SQL trace from this program? |
Saving another incarnation of this error using
but
The data is from |
Date: Wed, 18 Jan 2017 03:41:37 -0800
From: F Saad <[email protected]>
Saving another incarnation of this error using `COUNT(*)` for future reference, where `bdb.execute` complains
```
E AssertionError: Invalid select table: u't'
```
but `bdb.sql_execute` is fine
```
qt = sqlite3_quote_name(table)
qc = sqlite3_quote_name(cmd.name)
cursor = bdb.execute(
'SELECT COUNT(*) FROM %s WHERE %s IS NOT NULL' %
(qt, qc))
```
The data is from `test_csv.csv_data` and `qc` is `height`.
Interesting. Somehow a Unicode string is getting passed through, but
as I recall BQL works exclusively in US-ASCII. The reason this
assertion fires is that the select table is the Unicode string u't',
not the byte string b't' (a.k.a. just 't' in Python 2).
|
What is |
fsaad
pushed a commit
that referenced
this issue
Feb 24, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OK, but replacing the line
returns
The text was updated successfully, but these errors were encountered: