File talk:Bots hackathon 2013.pdf

Jump to navigation Jump to search

Known errors[edit]

With Ubuntu 13.04 and Python 2.7.2:

 pywikipedia-rewrite# python login
Traceback (most recent call last):
  File "", line 50, in <module>
  File "scripts/", line 50, in <module>
    import pywikibot
  File "/var/www/Personnel/mybot/pywikipedia-rewrite/pywikibot/", line 190, in <module>
    from page import Page, ImagePage, Category, Link, User, ItemPage, PropertyPage, Claim
  File "/var/www/Personnel/mybot/pywikipedia-rewrite/pywikibot/", line 16, in <module>
  File "/var/www/Personnel/mybot/pywikipedia-rewrite/pywikibot/", line 33, in <module>
    from import api
  File "/var/www/Personnel/mybot/pywikipedia-rewrite/pywikibot/data/", line 13, in <module>
    from pywikibot.comms import http
  File "/var/www/Personnel/mybot/pywikipedia-rewrite/pywikibot/comms/", line 34, in <module>
    import threadedhttp
  File "/var/www/Personnel/mybot/pywikipedia-rewrite/pywikibot/comms/", line 41, in <module>
    import httplib2
  File "/var/www/Personnel/mybot/pywikipedia-rewrite/externals/httplib2/httplib2/", line 740, in <module>
    class HTTPSConnectionWithTimeout(httplib.HTTPSConnection):
AttributeError: 'module' object has no attribute 'HTTPSConnection'

I tried to import httplib2 but the error is persisting... JackPotte (talk) 09:57, 26 May 2013 (UTC)

Then valhallasw suggested me to import ssl, and the error includes a strange comment:

 pywikipedia-rewrite# python login
Traceback (most recent call last):
  File "", line 15, in <module>
    import sys,os,ssl
  File "/usr/local/lib/python2.7/", line 60, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: No module named _ssl

JackPotte (talk) 13:40, 15 June 2013 (UTC)

root@jackbot:~# dpkg -s python2.7
Package: python2.7
Status: install ok installed
Priority: standard
Section: python
Installed-Size: 628
Maintainer: Ubuntu Core Developers <>
Architecture: i386
Multi-Arch: allowed
Version: 2.7.4-2ubuntu3
Replaces: python-profiler (<= 2.7.1-2), python2.7-minimal (<< 2.7.3-7~)
Depends: python2.7-minimal (= 2.7.4-2ubuntu3), libpython2.7-stdlib (= 2.7.4-2ubuntu3), mime-support
Suggests: python2.7-doc, binutils
Breaks: python-virtualenv (<<, vim-athena (<< 2:7.3.547-4), vim-gnome (<< 2:7.3.547-4), vim-gtk (<< 2:7.3.547-4), vim-nox (<< 2:7.3.547-4)
Conflicts: python-profiler (<= 2.7.1-2)
Description: Interactive high-level object-oriented language (version 2.7)
 Version 2.7 of the high-level, interactive object oriented language,
 includes an extensive class library with lots of goodies for
 network programming, system administration, sounds and graphics.
Original-Maintainer: Matthias Klose <>

valhallasw made me solved the problem by copying this file:

pywikipedia-rewrite# cp /usr/lib/python2.7/lib-dynload/ .

JackPotte (talk) 14:17, 15 June 2013 (UTC)