Path: csiph.com!usenet.pasdenom.info!news.franciliens.net!fdn.fr!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'attribute': 0.07; 'jesus': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'attribute.': 0.16; 'errors:': 0.16; 'finney': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'say.': 0.16; 'smith"': 0.16; 'subject:caught': 0.16; 'subject:import': 0.16; 'example': 0.22; 'saying': 0.22; 'header:User-Agent:1': 0.23; 'driven': 0.24; 'header:X-Complaints-To:1': 0.27; 'rest': 0.29; "doesn't": 0.30; "i'm": 0.30; '(which': 0.31; 'program,': 0.31; 'code': 0.31; 'getting': 0.31; 'religious': 0.31; 'writes:': 0.31; 'minimal': 0.33; 'actual': 0.34; 'subject:the': 0.34; 'problem': 0.35; 'but': 0.35; 'there': 0.35; 'i.e.': 0.36; 'object,': 0.36; 'url:org': 0.36; 'clear': 0.37; 'ben': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'ensure': 0.60; 'most': 0.60; "you're": 0.61; 'complete': 0.62; 'show': 0.63; 'skip:\xe2 10': 0.65; '\xe2\x80\x93': 0.77; '8bit%:46': 0.78; 'irrelevant': 0.84; 'paradox': 0.84; 'received:125': 0.84; 'scratch,': 0.84; 'terrible': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Ben Finney Subject: Re: caught in the import web again Date: Sun, 16 Nov 2014 10:43:02 +1100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: jigong.madmonks.org X-Public-Key-ID: 0xAC128405 X-Public-Key-Fingerprint: 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405 X-Public-Key-URL: http://www.benfinney.id.au/contact/bfinney-pubkey.asc X-Post-From: Ben Finney User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) Cancel-Lock: sha1:h5JvMzDxKeE9ZT6hRO2XrtLXi/4= X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1416094993 news.xs4all.nl 2927 [2001:888:2000:d::a6]:38815 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:80841 "Charles T. Smith" writes: > Now, I'm getting these errors: Please reduce the problem to a minimal, complete example demonstrating the behaviour so that you can show us exactly what's happening. > AttributeError: 'module' object has no attribute ... > > (what is 'module'?) The type of the object which doesn't have the attribute. It's saying you're tring to access an attribute on a particular object, and that object (which is of type ‘module’, hence it is a “'module' object”) doesn't have that attribute. > Is there a way to resolve this without having to restructure my code > every couple of days? Not knowing what the actual problem is, it's difficult to say. Please come up with a (contrived, if you like) minimal clear example of what's happening – i.e. make it from scratch, without irrelevant parts from the rest of your program, but ensure it still does what you're confused by – and present it here. -- \ “It's a terrible paradox that most charities are driven by | `\ religious belief.… if you think altruism without Jesus is not | _o__) altruism, then you're a dick.” —Tim Minchin, 2010-11-28 | Ben Finney