Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106688
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2016-04-08 09:00 -0700 |
| Message-ID | <cf3f3eab-6d8d-49d4-932a-b3905f5bac53@googlegroups.com> (permalink) |
| Subject | Python 3.4 problem with requests module |
| From | 1leefig@gmail.com |
Hi all,
I would appreciate any thoughts that you may have regarding a troublesome build error. I am at my wits end.
For some strange reason a get a single error on importing. It's to do with the requests module and pyopenssl.py
The comment block indicates:
This needs the following packages installed:
* pyOpenSSL (tested with 0.13)
* ndg-httpsclient (tested with 0.3.2)
* pyasn1 (tested with 0.1.6)
I have done this.
The requests module then imports:
from __future__ import absolute_import
try:
from ndg.httpsclient.ssl_peer_verification import SUBJ_ALT_NAME_SUPPORT
from ndg.httpsclient.subj_alt_name import SubjectAltName as BaseSubjectAltName
except SyntaxError as e:
raise ImportError(e)
import OpenSSL.SSL
from pyasn1.codec.der import decoder as der_decoder
from pyasn1.type import univ, constraint
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.
I am not sure if its to do with the csv fetcher functionality and have tried everything.
Thanks
Back to comp.lang.python | Previous | Next — 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