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


Groups > comp.lang.python > #74324

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

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <joel.goldstick@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'attribute': 0.07; "subject:' ": 0.07; 'dan': 0.09; 'dependency': 0.09; "django's": 0.09; 'django,': 0.09; 'expected.': 0.09; 'method,': 0.09; 'name?': 0.09; 'seen,': 0.09; 'cc:addr:python-list': 0.11; 'def': 0.12; '"python': 0.16; '__all__': 0.16; '__file__,': 0.16; '__init__.py': 0.16; 'attribute?': 0.16; 'cc:name:python list': 0.16; 'function?': 0.16; 'hits': 0.16; 'manage.py': 0.16; "module's": 0.16; 'relevant.': 0.16; 'skip:" 80': 0.16; 'subject:object': 0.16; 'symbols': 0.16; 'wrote:': 0.18; 'module': 0.19; "skip:' 30": 0.19; 'thu,': 0.19; 'version.': 0.19; 'help.': 0.21; 'import': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'circular': 0.24; 'skip:e 30': 0.24; 'fine': 0.24; 'looks': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'compiled': 0.26; 'skip:" 40': 0.26; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'correct': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'gives': 0.31; 'anyone': 0.31; 'file': 0.32; 'me?': 0.32; 'thanks!': 0.32; 'url:python': 0.33; '(most': 0.33; 'trouble': 0.34; 'skip:s 30': 0.35; 'no,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'add': 0.35; 'there': 0.35; 'version': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'error.': 0.37; 'two': 0.37; 'list': 0.37; 'being': 0.38; 'pm,': 0.38; 'rather': 0.38; 'recent': 0.39; 'does': 0.39; 'url:mail': 0.40; 'full': 0.61; 'new': 0.61; 'no.': 0.61; 'skip:* 10': 0.61; 'first': 0.61; 'to:addr:gmail.com': 0.65; 'jul': 0.74; 'subject:skip:A 10': 0.78; 'subject:Solution': 0.84; 'joel': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zsdcWiQ9cy6Z+io0TPLIfT/Z7qxelMMW1oDM+DKvYjA=; b=q74l4/p9iwxchCqM2eNARfLh/EdXCSWtOdp3wVsUpSMpZ2Oy5ysH4MryW/IYqFojNN nAj1EgryxQp/p4KkdC0xFiUoh1Znvk3SCgc4MRmAK7Xd562ozsCdkp5D1bCjqWjJNja0 QbNAlncBlCbYRaTMfSMvxpWPMnox8gjy0QJT1I5CcFn/bnQaYhr2zWJ+9QsTqJgFBLK2 oQPzJ6SO5/PQq2IWFl0seviFR8aYlX47D7gPwZA2cD+AGwASO/h8Av2RioiLoToeNfug 8vlT5Uz6UVpyf2JMCq1lDnoMsl87e/jk+HCL6Unl9FfXMAuds2wcCYD0cBIWR3DDm1qz +Urw==
MIME-Version 1.0
X-Received by 10.220.167.2 with SMTP id o2mr46032411vcy.8.1405013516193; Thu, 10 Jul 2014 10:31:56 -0700 (PDT)
In-Reply-To <CAGGBd_oBv8T+S85REU_m+hp62yQaZZQiHz_kuQ0fQb445J9ooA@mail.gmail.com>
References <CAGGBd_oBv8T+S85REU_m+hp62yQaZZQiHz_kuQ0fQb445J9ooA@mail.gmail.com>
Date Thu, 10 Jul 2014 13:31:56 -0400
Subject Re: Solution-resistant AttributeError: 'modle' object has no attribute...
From Joel Goldstick <joel.goldstick@gmail.com>
To Dan Stromberg <drsalists@gmail.com>
Content-Type text/plain; charset=UTF-8
Cc isaac.henry@soterawireless.com, Python List <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.11739.1405013518.18130.python-list@python.org> (permalink)
Lines 63
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1405013518 news.xs4all.nl 2947 [2001:888:2000:d::a6]:45557
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:74324

Show key headers only | View raw


On Thu, Jul 10, 2014 at 12:41 PM, Dan Stromberg <drsalists@gmail.com> wrote:
> Hi folks.
>
> I'm having trouble with a strange AttributeError.  I'm using RQ (Redis
> Queue) and Django, both of which are new to me, so perhaps they are
> somehow relevant.
>
> Anyway, the traceback looks like:
> Traceback (most recent call last):
>   File "/home/ec2-user/miniconda/envs/sciencedb/lib/python2.7/site-packages/rq/worker.py",
> line 479, in perform_job
>     rv = job.perform()
>   File "/home/ec2-user/miniconda/envs/sciencedb/lib/python2.7/site-packages/rq/job.py",
> line 466, in perform
>     self._result = self.func(*self.args, **self.kwargs)
>   File "/home/ec2-user/science_server/higgins/tasks.py", line 276, in
> session_retrieval_manager
>     dummy = higgins.models.extract_guid_from_visi_filename
> AttributeError: 'module' object has no attribute
> 'extract_guid_from_visi_filename'

Do you need to add parens?  is this a method, not at attribute?
    dummy = higgins.models.extract_guid_from_visi_filename()

>
> But looking in higgins/models.py, I see a def for
> extract_guid_from_visi_filename.
>
> Here's a list of things I've checked/tried, compiled from the first
> two pages of google hits on the error, and a couple of my own guesses:
> # circular dependency in imports?  No.
> # module of same name?  No, because __file__ looks correct
> # Not in Django's settings.py's INSTALLED_APPS?  No, higgins is
> present in INSTALLED_APPS
> # No __init__.py?  There is an __init__.py in the higgins directory
> # Old .pyc?  No, I've removed it and same result
> # __all__ present?  No
> # Need to from module import function?  No, does not help.
>
> BTW, pylint doesn't flag an error.
>
> BTW, I can import and retrieve the function fine in django's "python
> manage.py shell".
>
> If I sys.stderr.write the module's __file__, it gives a full path that
> looks as expected.
>
> If I sys.stderr.write(dir(higgins.models)), it has some of the symbols
> from higgins.models, but some of them are missing, including the
> function I want.  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?
>
> Thanks!
> --
> https://mail.python.org/mailman/listinfo/python-list



-- 
Joel Goldstick
http://joelgoldstick.com

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


Thread

Re: Solution-resistant AttributeError: 'modle' object has no attribute... Joel Goldstick <joel.goldstick@gmail.com> - 2014-07-10 13:31 -0400
  Re: Solution-resistant AttributeError: 'modle' object has no attribute... Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-07-10 22:50 +0000

csiph-web