https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
Bug ID: 65089 Summary: Error: No module named httplib2 Product: Pywikibot Version: core (2.0) Hardware: PC OS: Linux Status: NEW Severity: normal Priority: Unprioritized Component: General Assignee: Pywikipedia-bugs@lists.wikimedia.org Reporter: dan.mac22@gmail.com Web browser: --- Mobile Platform: ---
I can't use pywikibot in my pc, it return the error "ImportError: No module named httplib2". I'm using core version.
$ git pull Already up-to-date. $ git submodule foreach git pull Entering 'externals/httplib2' Already up-to-date. Entering 'scripts/i18n' Already up-to-date. $ python Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import pywikibot
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pywikibot/__init__.py", line 427, in <module> from .page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim File "pywikibot/page.py", line 17, in <module> import pywikibot.site File "pywikibot/site.py", line 34, in <module> from pywikibot.data import api File "pywikibot/data/api.py", line 13, in <module> from pywikibot.comms import http File "pywikibot/comms/http.py", line 31, in <module> from httplib2 import SSLHandshakeError ImportError: No module named httplib2
https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |valhallasw@arctus.nl
--- Comment #1 from Merlijn van Deen valhallasw@arctus.nl --- There are two ways to use pywikibot
1) as a library. Run "python setup.py develop"; this will install pywikibot in your python library folder
2) as a 'portable app'. In that case, you have to run everything through pwb.py to patch up your paths. Run "python pwb.py scriptname" to run a script, or "python -i pwb.py" to get a shell.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
--- Comment #2 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 132497 had a related patch set uploaded by Merlijn van Deen: Bug 65089: add 'shell' script
https://gerrit.wikimedia.org/r/132497
https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
Gerrit Notification Bot gerritadmin@wikimedia.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |PATCH_TO_REVIEW
https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
--- Comment #3 from Merlijn van Deen valhallasw@arctus.nl --- After that patch is merged, you can also run
python pwb.py shell
to get an interactive shell (like e.g. Django, where you run 'manage.py shell')
https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
--- Comment #4 from Danilo dan.mac22@gmail.com --- Ok, now it is working :)
I used to use the old trunk version and I didn't know that
Thank you
https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
--- Comment #5 from Gerrit Notification Bot gerritadmin@wikimedia.org --- Change 132497 merged by jenkins-bot: Bug 65089: add 'shell' script
https://gerrit.wikimedia.org/r/132497
https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
xqt info@gno.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |info@gno.de
--- Comment #6 from xqt info@gno.de --- Merlijn, the usage should be documented anywhere.
https://bugzilla.wikimedia.org/show_bug.cgi?id=65089
Merlijn van Deen valhallasw@arctus.nl changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|PATCH_TO_REVIEW |RESOLVED Resolution|--- |FIXED
--- Comment #7 from Merlijn van Deen valhallasw@arctus.nl --- Added to https://www.mediawiki.org/wiki/Manual:Pywikibot/Create_your_own_script
pywikipedia-bugs@lists.wikimedia.org