Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!bcyclone02.am1.xlned.com!bcyclone02.am1.xlned.com!newsfeed.xs4all.nl!newsfeed4.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.049 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:Getting': 0.07; 'ping': 0.09; 'try:': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'import': 0.22; 'cc:addr:python.org': 0.22; 'error': 0.23; 'cc:2**0': 0.24; 'code:': 0.26; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'host': 0.29; 'message- id:@mail.gmail.com': 0.30; 'getting': 0.31; "skip:' 10": 0.31; 'subject:from': 0.34; 'except': 0.35; 'received:google.com': 0.35; 'nov': 0.38; 'issue': 0.38; 'pm,': 0.38; 'skip:p 20': 0.39; 'even': 0.60; 'simple': 0.61; "you're": 0.61; 'skip:n 10': 0.64; '30,': 0.65; 'beatrix': 0.84; 'route': 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=2nmZ0qCSmYHKcdwt/rODs/xINF/s7Ki5YMWuFhsB7YY=; b=SpYKnhxvrkkWRSlwvN+M5AVvVOOPdmR9Mh7xBj1CHbzybkqdj5TC8UWx5ryedgW8lv 9m3/5n06j2nGVlPRgM5wcMiTFnzAFgjqjVOncSVqywtU9g1KTYMB5qEYSsxb/Zzj6+dJ Sk41QnJ5CYhxdN3z7cBuyurif/ruFneCW2n/Xd7fG/S1ehDuvBdf40UuSL++OqF1pVoc 5pznKW5nJTTMyVx+dTWNWsqWieJ6pZrQ3NWldhA5AmQaerZ+mJrgMOyzPZHamcimmHIN hIStbA/weH1QH+1jBO3Balu8kf824qOu6aituC2PBRNQISR2zmM7Q798nmS+O8T1EyvB NMPg== MIME-Version: 1.0 X-Received: by 10.50.152.104 with SMTP id ux8mr41114998igb.14.1417348960810; Sun, 30 Nov 2014 04:02:40 -0800 (PST) In-Reply-To: <4B0DF114-E705-47B3-9815-003899F174CE@beatrixwillius.de> References: <4B0DF114-E705-47B3-9815-003899F174CE@beatrixwillius.de> Date: Sun, 30 Nov 2014 23:02:40 +1100 Subject: Re: Getting errors from Imaplib 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.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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1417349371 news.xs4all.nl 2843 [2001:888:2000:d::a6]:35246 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 3541 X-Received-Body-CRC: 2901955419 Xref: csiph.com comp.lang.python:81730 On Sun, Nov 30, 2014 at 7:36 PM, Beatrix Willius from Moth Software wrote: > > Let's say I have the following very simple Python code: > > import imaplib > > host = 'imap.gmail.com' > try: > imap_connection = imaplib.IMAP4(host) > print('success') > except imaplib.IMAP4.error: > print('authentication failed') > > OSError: [Errno 65] No route to host You're getting an error before it even gets as far as authenticating - there's a network-level issue here. Are you able to ping that host? Something's not connected. ChrisA