yhat / db.py

db.py is an easier way to interact with your databases
BSD 2-Clause "Simplified" License
1.22k stars 111 forks source link

example from twitter apparently doesn't work on Python3 #66

Closed stonebig closed 7 years ago

stonebig commented 9 years ago

http://blog.yhathq.com/posts/dbpy-0.4-handlebars-meets-sql.html (trying on python3.4, windows)

D:\WinPython\basedir34\build\winpython-3.4.3.amd64\python-3.4.3.amd64\lib\site-packages\db\db.py in _apply_handlebars(self, q, data, union)
   1034 
   1035     def _apply_handlebars(self, q, data, union=True):
-> 1036         q = unicode(q)
   1037         template = self.handlebars.compile(q)
   1038         if isinstance(data, list):

NameError: name 'unicode' is not defined
glamp commented 7 years ago

fixed