Re: ImportError with pickle (Python 2.7.9), possibly platform dependent

2015-05-13 Thread Ben Sizer
On Friday, 1 May 2015 13:34:41 UTC+1, Peter Otten wrote: > Ben Sizer wrote: > > > So... I don't know how to fix this, but I do now know why it fails, and I > > have a satisfactory answer for why it is acting differently on the Linux > > server (and that is just because that is the only one runnin

Re: ImportError with pickle (Python 2.7.9), possibly platform dependent

2015-05-13 Thread Ben Sizer
On Friday, 1 May 2015 13:09:48 UTC+1, Chris Angelico wrote: > > Cool! That's part way. So, can you simply stuff OMDBMap into > sys.modules prior to loading? It might be a bit of a hack, but it > should work for testing, at least. Conversely, you could change the > dump script to import via the na

Re: ImportError with pickle (Python 2.7.9), possibly platform dependent

2015-05-01 Thread Peter Otten
Ben Sizer wrote: > On Thursday, 30 April 2015 01:45:05 UTC+1, Chris Angelico wrote: >> On Thu, Apr 30, 2015 at 2:01 AM, Ben Sizer wrote: >> > 1) There clearly is a module named OMDBMap, and it's importable - it's >> > there in the 2nd line of the traceback. >> > >> > Does anybody have any suggest

Re: ImportError with pickle (Python 2.7.9), possibly platform dependent

2015-05-01 Thread Chris Angelico
On Fri, May 1, 2015 at 9:01 PM, Ben Sizer wrote: > Another good question, and this gives us the answer. The module lists are > quite different, as I'd expect because the load happens in the context of the > full application whereas the dump happens as a standalone script. But > literally every

Re: ImportError with pickle (Python 2.7.9), possibly platform dependent

2015-05-01 Thread Ben Sizer
On Thursday, 30 April 2015 01:45:05 UTC+1, Chris Angelico wrote: > On Thu, Apr 30, 2015 at 2:01 AM, Ben Sizer wrote: > > 1) There clearly is a module named OMDBMap, and it's importable - it's > > there in the 2nd line of the traceback. > > > > Does anybody have any suggestions on how I can go abo

Re: ImportError with pickle (Python 2.7.9), possibly platform dependent

2015-04-29 Thread Chris Angelico
On Thu, Apr 30, 2015 at 2:01 AM, Ben Sizer wrote: > 1) There clearly is a module named OMDBMap, and it's importable - it's there > in the 2nd line of the traceback. > > Does anybody have any suggestions on how I can go about debugging this? Or > refactoring it to avoid whatever is happening here

ImportError with pickle (Python 2.7.9), possibly platform dependent

2015-04-29 Thread Ben Sizer
I'm saving some data via pickle, and loading it in is proving tricky. Traceback (most recent call last): [...some lines removed...] File "/home/kylotan/OMDBSetup.py", line 44, in get_omdb_map __omdb_map = OMDBMap.OMDBMap.load_from_binary(full_path) File "/home/kylotan/OMDBMap.py", line 87, in