Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 808912 - ImportError on requests
Summary: ImportError on requests
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-requests
Version: el6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Arun S A G
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 808987
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-01 16:38 UTC by Pierre-YvesChibon
Modified: 2012-05-05 18:30 UTC (History)
1 user (show)

Fixed In Version: python-requests-0.11.1-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-05 18:30:19 UTC
Type: ---


Attachments (Terms of Use)

Description Pierre-YvesChibon 2012-04-01 16:38:00 UTC
Description of problem:
Apparently python-requests doesn't like https:

>>> import requests
>>> request.get('https://fedorahosted.org/releases/F/e/FedoraReview/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'request' is not defined
>>> requests.get('https://fedorahosted.org/releases/F/e/FedoraReview/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/requests/api.py", line 51, in get
    return request('get', url, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/api.py", line 39, in request
    return s.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 200, in request
    r.send(prefetch=prefetch)
  File "/usr/lib/python2.6/site-packages/requests/models.py", line 489, in send
    cert_loc = __import__('certifi').where()
ImportError: No module named certifi


$ rpm -q python-requests
python-requests-0.10.6-3.el6.noarch

Comment 1 Pierre-YvesChibon 2012-04-01 16:38:50 UTC
Well looks like the https isn't the actual cause in fact:
>>> requests.get('http://fedorahosted.org/releases/F/e/FedoraReview/')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/requests/api.py", line 51, in get
    return request('get', url, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/api.py", line 39, in request
    return s.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.6/site-packages/requests/sessions.py", line 200, in request
    r.send(prefetch=prefetch)
  File "/usr/lib/python2.6/site-packages/requests/models.py", line 557, in send
    self._build_response(r)
  File "/usr/lib/python2.6/site-packages/requests/models.py", line 262, in _build_response
    request.send()
  File "/usr/lib/python2.6/site-packages/requests/models.py", line 489, in send
    cert_loc = __import__('certifi').where()
ImportError: No module named certifi

Comment 2 Arun S A G 2012-04-02 06:57:25 UTC
My bad! I should package certifi first! Submitted the package for review.

Comment 3 Fedora Update System 2012-04-08 17:43:35 UTC
python-requests-0.11.1-2.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/python-requests-0.11.1-2.el6

Comment 4 Fedora Update System 2012-04-12 05:58:12 UTC
Package python-requests-0.11.1-2.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-requests-0.11.1-2.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2012-5528/python-requests-0.11.1-2.el6
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2012-05-05 18:30:19 UTC
python-requests-0.11.1-2.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.