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


Groups > comp.lang.python > #74317 > unrolled thread

Re: Solution-resistant AttributeError: 'modle' object has no attribute...

Started byChris Angelico <rosuav@gmail.com>
First post2014-07-11 02:58 +1000
Last post2014-07-11 02:58 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Solution-resistant AttributeError: 'modle' object has no attribute... Chris Angelico <rosuav@gmail.com> - 2014-07-11 02:58 +1000

#74317 — Re: Solution-resistant AttributeError: 'modle' object has no attribute...

FromChris Angelico <rosuav@gmail.com>
Date2014-07-11 02:58 +1000
SubjectRe: Solution-resistant AttributeError: 'modle' object has no attribute...
Message-ID<mailman.11734.1405011487.18130.python-list@python.org>
On Fri, Jul 11, 2014 at 2:41 AM, Dan Stromberg <drsalists@gmail.com> wrote:
> It's as though an old version of the module is being
> seen, rather than the current version.
>
> Anyone have any (further) suggestions for me?
>

Wipe out *.pyc and try again? Restart any processes that are running
Django, in case they have it cached in memory?

This is something Python isn't really designed for (coping with
multiple versions of a module simultaneously). The Python import
machinery seems to assume that, across one process's lifetime, all .py
and .pyc (etc) files ever used will remain pristine, and can safely be
cached etc. There's no good mechanism for saying "Hey, Python, I just
updated this file, can you load the new version please?" - every
method I've seen for doing so seems to require fiddling around with
internals, and/or extreme risk of getting the wrong version.

ChrisA

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web