py3 compat changes
This commit is contained in:
parent
5a967031c8
commit
e3e3d0b1f5
|
|
@ -79,7 +79,9 @@ def load_examples(sample):
|
|||
|
||||
BirthNames.create(db.engine)
|
||||
session = db.session()
|
||||
with gzip.open(config.get("BASE_DIR") + '/data/birth_names.csv.gz') as f:
|
||||
with gzip.open(
|
||||
config.get("BASE_DIR") + '/data/birth_names.csv.gz',
|
||||
encoding="ascii") as f:
|
||||
bb_csv = csv.reader(f)
|
||||
for i, (state, year, name, gender, num) in enumerate(bb_csv):
|
||||
if i == 0 or year < "1965": # jumpy data before 1965
|
||||
|
|
|
|||
|
|
@ -458,7 +458,6 @@ class SqlaTable(Model, Queryable, AuditMixinNullable):
|
|||
|
||||
engine = self.database.get_sqla_engine()
|
||||
sql = str(qry.compile(engine, compile_kwargs={"literal_binds": True}))
|
||||
print sql
|
||||
df = read_sql_query(
|
||||
sql=sql,
|
||||
con=engine
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import imp
|
||||
import os
|
||||
import unittest
|
||||
import urllib2
|
||||
os.environ['PANORAMIX_CONFIG'] = 'tests.panoramix_test_config'
|
||||
from flask.ext.testing import LiveServerTestCase, TestCase
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue