Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90543

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

Newsgroups comp.lang.python
Date 2015-05-13 03:27 -0700
References <494551ca-532f-4d4d-aff0-a3932416c8f4@googlegroups.com> <mailman.108.1430354695.3680.python-list@python.org> <20a5c7bf-2163-4b7a-8495-30ce23239903@googlegroups.com> <mailman.11.1430483669.3347.python-list@python.org>
Message-ID <a4cc8273-0e0f-4eec-adc3-4edd321343dc@googlegroups.com> (permalink)
Subject Re: ImportError with pickle (Python 2.7.9), possibly platform dependent
From Ben Sizer <kylotan@gmail.com>

Show all headers | View raw


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 running under WSGI).
> > Two out of three isn't bad!
> 
> How about moving OMDBMap.py into the parent folder of my_wsgi_app.__file__ 
> or any other folder in sys.path?

That might work, but wouldn't be practical for us because in some configurations my_wsgi_app doesn't exist at all (as it is an artifact of running under mod_wsgi environment) and when it does, it it at the top of the hierarchy - so the rest of the app wouldn't be access modules there.

It could be put into sys.path somewhere else... but that is starting to break the project structure just to satisfy pickle. Instead, we'll just use a different format in future.

-- 
Ben Sizer

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

ImportError with pickle (Python 2.7.9), possibly platform dependent Ben Sizer <kylotan@gmail.com> - 2015-04-29 09:01 -0700
  Re: ImportError with pickle (Python 2.7.9), possibly platform dependent Chris Angelico <rosuav@gmail.com> - 2015-04-30 10:44 +1000
    Re: ImportError with pickle (Python 2.7.9), possibly platform dependent Ben Sizer <kylotan@gmail.com> - 2015-05-01 04:01 -0700
      Re: ImportError with pickle (Python 2.7.9), possibly platform dependent Chris Angelico <rosuav@gmail.com> - 2015-05-01 22:09 +1000
        Re: ImportError with pickle (Python 2.7.9), possibly platform dependent Ben Sizer <kylotan@gmail.com> - 2015-05-13 03:23 -0700
      Re: ImportError with pickle (Python 2.7.9), possibly platform dependent Peter Otten <__peter__@web.de> - 2015-05-01 14:34 +0200
        Re: ImportError with pickle (Python 2.7.9), possibly platform dependent Ben Sizer <kylotan@gmail.com> - 2015-05-13 03:27 -0700

csiph-web