1

I use Python 3.4 and have problem with UnQlite database. It works with Python 2.x but in newer version after

from unqlite import UnQLite
db = UnQLite()

the error appers:

File "/home/mwalko/PycharmProjects/PracaInzynierska/bin/project/calculations/Calculate.py", line 32, in __init__
db = UnQLite()
File "unqlite.pyx", line 285, in unqlite.UnQLite.__init__ (unqlite.c:1888)
File "unqlite.pyx", line 296, in unqlite.UnQLite.open (unqlite.c:2003)
TypeError: expected bytes, str found

Is there any way to solve this problem?

Michu93
  • 5,058
  • 7
  • 47
  • 80
  • Are you using https://github.com/coleifer/unqlite-python ? It doesn't support Python 3. – vaultah Nov 25 '15 at 09:40
  • Yes, in limitation we can find "Python 2.x only. No support for Python 3" – Michu93 Nov 25 '15 at 09:47
  • Encoding- and type-related issues are pretty hard to fix. The best option is to wait until the maintainer make their project Python 3 compatible. I wouldn't keep my hopes up high: *"Ugh, I hate python 3. So much.*". – vaultah Nov 25 '15 at 09:53
  • Can you recommend other embedded noSQL database? (which works with Python 3.x) – Michu93 Nov 25 '15 at 09:57
  • 1
    Berkeley DB is also a popular choice, although I don't know if there're any Python 3 connectors. There's Vedis, but the only connector I know is provided by the maintainer of unqlite-python. [rlite](https://github.com/seppo0010/rlite) looks promising, but I haven't tried it yet. – vaultah Nov 25 '15 at 10:08
  • 1
    Thanks, BerkleyDB works great with Python 3.4 – Michu93 Nov 25 '15 at 10:19

0 Answers0