redis-collections basestring错误

时间:2014-10-30 06:49:01

标签: python-3.x redis

我使用redis-collections版本0.1.5与python3.4,但它抛出basestring错误。

>>>from redis_collections import Dict 
>>>d = Dict()
>>>d['answer'] = 42
>>>d

Traceback (most recent call last):                                                                                                              
  File "<stdin>", line 1, in <module>                                                                                                              
  File "/home/lukik/venv/py34/lib/python3.4/site-packages/redis_collections/base.py", line 296, in __repr__                                       
    data = self._repr_data(self._data())                                                                                                           
  File "/home/lukik/venv/py34/lib/python3.4/site-packages/redis_collections/dicts.py", line 171, in _data                                         
    return [(k, self._unpickle(v)) for (k, v) in result]                                                                                           
  File "/home/lukik/venv/py34/lib/python3.4/site-packages/redis_collections/dicts.py", line 171, in <listcomp>                                    
    return [(k, self._unpickle(v)) for (k, v) in result]                                                                                           
  File "/home/lukik/venv/py34/lib/python3.4/site-packages/redis_collections/base.py", line 225, in _unpickle                                      
    if not isinstance(string, basestring):                                                                                                         
NameError: name 'basestring' is not defined  

在github中看起来像python3兼容性问题看起来像是resolved

0 个答案:

没有答案