Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106689
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Python 3.4 problem with requests module |
| Date | Sat, 9 Apr 2016 02:24:54 +1000 |
| Lines | 23 |
| Message-ID | <mailman.92.1460132703.2253.python-list@python.org> (permalink) |
| References | <cf3f3eab-6d8d-49d4-932a-b3905f5bac53@googlegroups.com> <CAPTjJmr9AkWiJKKPWtHMz89pDmLb4HdRmChWDUxVxwe-ch5nqA@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| X-Trace | news.uni-berlin.de 3RSig0HOeqCo5MQZ39T/VAFpEMPYrcdBJzGn3jGYb23g== |
| Return-Path | <rosuav@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; 'subject:Python': 0.05; 'line:': 0.07; 'rename': 0.07; 'socket': 0.07; 'cc:addr:python- list': 0.09; 'importerror': 0.09; 'subject:module': 0.09; 'unhandled': 0.09; 'python': 0.10; 'exception': 0.13; '2016': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'socket.py': 0.16; 'subject:requests': 0.16; 'timeout,': 0.16; 'wrote:': 0.16; 'tells': 0.18; 'library': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'skip:" 30': 0.20; 'subject:problem': 0.22; 'am,': 0.23; 'installation': 0.23; 'sat,': 0.23; 'this:': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'points': 0.27; 'error': 0.27; 'message-id:@mail.gmail.com': 0.27; 'module.': 0.27; "skip:' 10": 0.28; 'looks': 0.29; 'code': 0.30; 'directory,': 0.33; '(for': 0.34; 'file': 0.34; 'running': 0.34; 'received:google.com': 0.35; 'path': 0.35; 'something': 0.35; 'problem.': 0.35; 'but': 0.36; 'should': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'delete': 0.38; 'skip:p 20': 0.38; 'subject:with': 0.40; 'called': 0.40; 'your': 0.60; '3.4': 0.84; 'chrisa': 0.84 |
| 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; bh=603Amv+oBUrVTZBHCM16HYjUxR45yc3lyS8uEhP4uj0=; b=Aq24itcSuWXJy49SpIWVkmD+9Z0z1LxZX1Ckwc5DjV3JiSIIfrphucVEcEQV0N8yMG cBpKP/04cLAPtwAg78ej0Wwtrm8pJU4OgDe3epVFqxPWlWzfLzeczfjebsF5uezsnBOZ Ij6ixCJlfteUqoeG+Sn3OtEIpp3UaIcrZoLmF5nxLckLmW2/HnPf6IssdH3RUIWjuqod jFXeENkhjS86hNKwSXF7Yod28zfZb56lE17WRbAvxa9BQ79kFCKqWBu2+WwOjIZdzqWx TUG0avOTNQr7Vex/EDu7g2mrkksaHW2S8EsBVx1X+Px2vdI7Nip8RxVSN5qy0wGDWKVw 66hQ== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=603Amv+oBUrVTZBHCM16HYjUxR45yc3lyS8uEhP4uj0=; b=Bgq38KN2dhFus6IBiFcstq2xt6yswM1ggcGm6YcfE3M8+WriFKxvbEzItdmAvHpeFw Sf2hLyiO3bA36Tg9NnvGfTZWP7N38Ih8sabNrWFgtfVXGi9u83GFXUW9mBB2bsSoYGmp tBZD4bipGLBrAIJ0DuIVUqpmm9hpn7r0smDmAdcZq4y0b/XkUthVUyZUv2zBfqNHVLFL H+w8aVPekU5ew74l9UwSdax84cAFyBnNqf7AuVQ8pJj/JeB091y8wmnfUNLNN9Pxxsqn Oskvqn5WVU7zCpCTGuxaplQRvSrOuwPCe5157QCwffWbjho8lLZEndvdgvYlzhv0neIz WUkQ== |
| X-Gm-Message-State | AD7BkJJQgqj2YRsrkvXQe0O2FrmpvjQsTCmzhHufltDbD+7HLLNLNmV7nmYGwdkLvHxcgx0OLtl8mQRjPqBFKg== |
| X-Received | by 10.50.138.233 with SMTP id qt9mr4757187igb.13.1460132694566; Fri, 08 Apr 2016 09:24:54 -0700 (PDT) |
| In-Reply-To | <cf3f3eab-6d8d-49d4-932a-b3905f5bac53@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.21 |
| 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> |
| X-Mailman-Original-Message-ID | <CAPTjJmr9AkWiJKKPWtHMz89pDmLb4HdRmChWDUxVxwe-ch5nqA@mail.gmail.com> |
| X-Mailman-Original-References | <cf3f3eab-6d8d-49d4-932a-b3905f5bac53@googlegroups.com> |
| Xref | csiph.com comp.lang.python:106689 |
Show key headers only | View raw
On Sat, Apr 9, 2016 at 2:00 AM, <1leefig@gmail.com> wrote: > from socket import _fileobject, timeout, error as SocketError > > But I get a python exception on this last line: > > ImportError was unhandled by user code > Message: cannot import name '_fileobject' > > > I am running Python 3.4 and had no problems previously. This looks like a shadowed import problem. Try running this: import socket print(socket.__file__) If all's well, you should get a file path that points to your Python installation (for me, "/usr/local/lib/python3.6/socket.py"). If it tells you something about your current directory, check for a file called socket.py or socket.pyc and rename or delete it - you've shadowed the standard library module. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python 3.4 problem with requests module 1leefig@gmail.com - 2016-04-08 09:00 -0700 Re: Python 3.4 problem with requests module Chris Angelico <rosuav@gmail.com> - 2016-04-09 02:24 +1000 Re: Python 3.4 problem with requests module Steven D'Aprano <steve@pearwood.info> - 2016-04-09 02:27 +1000 Re: Python 3.4 problem with requests module Chris Angelico <rosuav@gmail.com> - 2016-04-09 04:27 +1000
csiph-web