Skip to content

Commit

Permalink
Py3k fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Jul 20, 2016
1 parent c8629a6 commit 9eee239
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion matgendb/creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ def _insert_doc(self, d):
if "dos" in calc:
dos = json.dumps(calc["dos"], cls=MontyEncoder)
if self.compress_dos:
dos = zlib.compress(dos, self.compress_dos)
dos = zlib.compress(bytes(dos, 'utf-8'),
self.compress_dos)
calc["dos_compression"] = "zlib"
fs = gridfs.GridFS(db, "dos_fs")
dosid = fs.put(dos)
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pymatgen==4.0.0
pymatgen==4.1.1
monty==0.8.6
pymongo==3.2.2
pymongo==3.3.0
prettytable==0.7.2
mongomock==3.0.0
smoqe==0.1.3
Expand Down

0 comments on commit 9eee239

Please sign in to comment.