Skip to content

Commit

Permalink
py3 compat changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Oct 20, 2015
1 parent 5a96703 commit e3e3d0b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion panoramix/bin/panoramix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion panoramix/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ def query(

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
Expand Down
1 change: 0 additions & 1 deletion tests/core_tests.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit e3e3d0b

Please sign in to comment.