ImportError: Import by filename is not supported when unpickleing

Larry Martell larry.martell at gmail.com
Wed Jul 27 18:44:22 EDT 2016


On Wednesday, July 27, 2016, Jason Benjamin <hexusnexus at gmail.com
<javascript:_e(%7B%7D,'cvml','hexusnexus at gmail.com');>> wrote:

> On Wed, 27 Jul 2016 17:25:43 -0400, Larry Martell wrote:
>
> > When I try and unpickle an object with pickle.loads it fails with:
> >
> > ImportError: Import by filename is not supported when unpickleing
> >
> > I've never used pickle before. Why do I get this and how can I fix it?
>
> Try using *pickle.load* instead of *pickle.loads*.  pickle.loads is for
> strings.  Retrieved from documentation: help(pickle) after importing
> pickle.
>

I am unpickling a string created with pickle.dumps



More information about the Python-list mailing list