Re: ImportError: Import by filename is not supported when unpickleing

2016-07-28 Thread Lutz Horn
Hi, Am 07/28/2016 um 03:48 PM schrieb Larry Martell: Thanks, but I have abandoned using pickle. I am now converting my objects to JSON, writing them to files, passing the file names to the process and reading them in and converting them back to objects there. In addition to that working, it make

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-28 Thread Larry Martell
On Thu, Jul 28, 2016 at 8:51 AM, Nobody wrote: > On Wed, 27 Jul 2016 22:47:15 -0400, Larry Martell wrote: > >> Also let me add that initially I was calling Popen with shell=False and >> the arguments in a list, and that was failing with: >> >> arg 2 must contain only strings > > That indicates tha

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-28 Thread Nobody
On Wed, 27 Jul 2016 22:47:15 -0400, Larry Martell wrote: > Also let me add that initially I was calling Popen with shell=False and > the arguments in a list, and that was failing with: > > arg 2 must contain only strings That indicates that you're calling Popen() incorrectly. > And when I debug

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-28 Thread Larry Martell
On Thu, Jul 28, 2016 at 1:58 AM, Steven D'Aprano wrote: > On Thursday 28 July 2016 12:39, Larry Martell wrote: > >> I have an object of type Target: >> >> (Pdb) type(target) >> >> >> And I pickle it like this: >> >> (Pdb) type(pickle.dumps(target)) >> >> >> And then it looks like this: >> >> (Pd

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-27 Thread Steven D'Aprano
On Thursday 28 July 2016 12:39, Larry Martell wrote: > I have an object of type Target: > > (Pdb) type(target) > > > And I pickle it like this: > > (Pdb) type(pickle.dumps(target)) > > > And then it looks like this: > > (Pdb) pickle.dumps(target) > "ccopy_reg\n_reconstructor\np0\n(cworkite

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-27 Thread Larry Martell
ll only work on strings. *dumps* refers to >> a string too. >> >> Yes, I know. I have an object, which I pickle with dumps, which turns it >> into a string. Then I try to unpickle it with loads and I get that error. >> (Pdb) type(args.target) (Pdb) pickle.loads(args.ta

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-27 Thread Larry Martell
> Yes, I know. I have an object, which I pickle with dumps, which turns it > into a string. Then I try to unpickle it with loads and I get that error. > (Pdb) type(args.target) (Pdb) pickle.loads(args.target) *** > ImportError: Import by filename is not supported. > > On Wed, Jul

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-27 Thread Larry Martell
7 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

ImportError: Import by filename is not supported when unpickleing

2016-07-27 Thread Larry Martell
On Wednesday, July 27, 2016, Jason Benjamin > 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 > >

Re: ImportError: Import by filename is not supported when unpickleing

2016-07-27 Thread Jason Benjamin
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? Tr

ImportError: Import by filename is not supported when unpickleing

2016-07-27 Thread Larry Martell
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? -- https://mail.python.org/mailman/listinfo/python-list