1

I'm using jsonpickle (https://jsonpickle.github.io/) to serialize my Python Objects. But can't even seem to import without getting an error. Everything was installed using pip. Getting the following error:

In [2]: import jsonpickle
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-a2284d9459fb> in <module>()
----> 1 import jsonpickle

/Users/Zee/.virtualenvs/chime/lib/python2.7/site-packages/jsonpickle/__init__.py in <module>()
     54 
     55 """
---> 56 from jsonpickle import pickler
     57 from jsonpickle import unpickler
     58 from jsonpickle.backend import JSONBackend

/Users/Zee/.virtualenvs/chime/lib/python2.7/site-packages/jsonpickle/pickler.py in <module>()
     15 import jsonpickle.util as util
     16 import jsonpickle.tags as tags
---> 17 import jsonpickle.handlers as handlers
     18 
     19 from jsonpickle.backend import JSONBackend

/Users/Zee/.virtualenvs/chime/lib/python2.7/site-packages/jsonpickle/handlers.py in <module>()
    275         return queue.Queue()
    276 
--> 277 QueueHandler.handles(queue.Queue)
    278 
    279 

AttributeError: 'module' object has no attribute 'Queue'
zee
  • 656
  • 2
  • 7
  • 30
  • Possibly you have a ``queue.py`` file somewhere, that is shadowing the one in the standard library. ``import queue; print queue.__file__`` will tell you where it is. – jasonharper Apr 06 '17 at 16:09
  • @jasonharper Looks like that was the problem. I have a queue folder with a __init__.py in it. Running a Django app, so I can't just remove it. Any thoughts? – zee Apr 06 '17 at 23:04

0 Answers0