Closed donnemartin closed 8 years ago
@jamesls this one seems to be a little more complex I haven't yet figured out the best place to make the fix. Do you mind taking a look?
First run, creating autocomplete index...
First run, creating doc index, this will take a few minutes, but only needs to run once.
Traceback (most recent call last):
File "/Users/donnemartin/.virtualenvs/aws-shell3/bin/aws-shell", line 9, in
Taking a look
After fixing the above issue with bytes, I see another error with shelve. I think the main problem is that in py2 it adds the key to the db without modification, but in python 3 it always encodes the string. This is unfortunate because in py2, unicode strings do not work with shelve:
f[u'\u2713'] = 'asdfasfdasdf'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shelve.py", line 133, in __setitem__
self.dict[key] = f.getvalue()
TypeError: gdbm mappings have string indices only
I think the fix is going to have to not use shelve, and use dbm directly.
I think long term I'd probably like to switch over to sqlite, which has better cross platform support.
Sounds good, thanks for looking into it and for the update!
I'll be plugging the holes as they pop up, here are the first three I've encountered: