https://bugzilla.wikimedia.org/show_bug.cgi?id=56386
Web browser: --- Bug ID: 56386 Summary: setup.py should require httplib2 Product: Pywikibot Version: core (2.0) Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: kikkocristian@gmail.com Classification: Unclassified Mobile Platform: ---
Created attachment 13632 --> https://bugzilla.wikimedia.org/attachment.cgi?id=13632&action=edit Test script
Running <code>python setup.py install</code> while in virtualenv does not install automatically the httplib2 dependency.
<code> (pywikibot)cristian@cristian-F5N:~$ python test.py "Alessandro_Manzoni" Traceback (most recent call last): File "test.py", line 4, in <module> import pywikibot File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/__init__.py", line 313, in <module> from page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/page.py", line 16, in <module> import pywikibot.site File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/site.py", line 33, in <module> from pywikibot.data import api File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/data/api.py", line 13, in <module> from pywikibot.comms import http File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/comms/http.py", line 30, in <module> from httplib2 import SSLHandshakeError ImportError: No module named httplib2 </code>
<code>test.py</code> is attached.
I am using Python 2.7.3 under <code>virtualenv</code> version 1.9.1 on Ubuntu 12.10.
Furthermore installing the dependency with <code>pip install httplib2</code> cause the following bug.
<code> (pywikibot)cristian@cristian-F5N:~$ python test.py "Alessandro_Manzoni" ERROR: Traceback (most recent call last): File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/data/api.py", line 284, in submit body=paramstring) File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/comms/http.py", line 123, in request raise FatalServerError(str(request.data)) FatalServerError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
Traceback (most recent call last): File "test.py", line 12, in <module> item = pywikibot.ItemPage.fromPage(wikipage) File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/page.py", line 2527, in fromPage repo = page.site.data_repository() File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/page.py", line 98, in site return self._link.site File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/page.py", line 3224, in site self.parse() File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/page.py", line 3207, in parse if self._site.case() == 'first-letter': File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/site.py", line 1173, in case return self.siteinfo['case'] File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/site.py", line 1167, in siteinfo self._getsiteinfo() File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/site.py", line 1100, in _getsiteinfo sidata = sirequest.submit() File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/data/api.py", line 462, in submit self._data = super(CachedRequest, self).submit() File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/data/api.py", line 284, in submit body=paramstring) File "/home/cristian/.virtualenvs/pywikibot/local/lib/python2.7/site-packages/pywikibot/comms/http.py", line 123, in request raise FatalServerError(str(request.data)) pywikibot.exceptions.FatalServerError: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed </code>
Steps to reproduce: * download core.tar.gz and unzip * create virtualenv * run <code>python setup.py install</code> from <code>core</code> * run <code>python test.py "Alessandro_Manzoni"</code>