Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74317 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2014-07-11 02:58 +1000 |
| Last post | 2014-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.
Re: Solution-resistant AttributeError: 'modle' object has no attribute... Chris Angelico <rosuav@gmail.com> - 2014-07-11 02:58 +1000
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-07-11 02:58 +1000 |
| Subject | Re: 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
Back to top | Article view | comp.lang.python
csiph-web