Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!1.eu.feeder.erje.net!newsreader4.netcologne.de!news.netcologne.de!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.81.MISMATCH!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'differently.': 0.09; 'os.path': 0.09; 'skip:o 50': 0.09; 'cc:addr:python-list': 0.11; 'assume': 0.14; '......': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'traceback.': 0.16; 'wrote:': 0.18; 'module': 0.19; 'normally': 0.19; 'import': 0.22; 'issue.': 0.22; 'cc:addr:python.org': 0.22; 'fine': 0.24; 'environment': 0.24; 'cc:2**0': 0.24; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'resolution': 0.29; "doesn't": 0.30; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; 'getting': 0.31; 'fri,': 0.33; 'but': 0.35; 'received:google.com': 0.35; 'executing': 0.36; 'doing': 0.36; 'reports': 0.37; 'pm,': 0.38; 'expect': 0.39; 'complete': 0.62; '2015': 0.84; 'to:none': 0.92 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:cc :content-type; bh=D89WNUOiAb1qVEN2GSzBgDTdPbYSVGUkUFae0/KA/WI=; b=qsoA4hEvC89G8hoLtB2xbq/85gZ/uwwiHG4b/KHeCMGB/8ezXpx4Z6q9DmlM4TLpPJ csBFYrZJSY2s4gCoYpYg0TihK9AbQZqf3WM89UQRA/qL0pX0BJ2gPv54r6w7VG+HGAcT hKvtXd4a4FjF/YqPtxXh2uwdf6/UiuktfI/hI/G8xv+bKWoaWNQpkAT2qLgSM2dwV1Pa CBR7yiROWu5MnT4LPG9dIe+1GnLkhTxSTuuzi3rV+7ely9/bG3FhN+1gHYlt4ccSl20/ c1nWL3rfi6i7hWboWStQZ4qkPev1fvTISTA5ipyEa3LaXELl5dOVoGji7Y+ZVHSqYB0s UPeA== MIME-Version: 1.0 X-Received: by 10.50.66.172 with SMTP id g12mr9924298igt.34.1430482541083; Fri, 01 May 2015 05:15:41 -0700 (PDT) In-Reply-To: <55435578.50003@chamonix.reportlab.co.uk> References: <55435578.50003@chamonix.reportlab.co.uk> Date: Fri, 1 May 2015 22:15:41 +1000 Subject: Re: GAE environment differences From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430482543 news.xs4all.nl 2949 [2001:888:2000:d::a6]:56814 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:89726 On Fri, May 1, 2015 at 8:29 PM, Robin Becker wrote: > A user reports getting KeyError/ImportError when executing GAE dev/live code > looking like > > > import os > ....... > fn = os.path.expanduser(os.path.join('~','.reportlab_settings')) > ...... > > This works fine in cpython; so I assume that the GAE environment must be > doing module resolution differently. > > Is that the case or is it that os.path or os.path.expanduser doesn't exist? Best thing to do is to ask the user to post the complete traceback. You might need to use "import os.path" but normally I would expect that not to be an issue. ChrisA