https://bugzilla.wikimedia.org/show_bug.cgi?id=59970

--- Comment #2 from Merlijn van Deen <valhall...@arctus.nl> ---
Both are python 2 (Queue)/ python 3 (queue) import blocks. However, the issue
is *not* queue, even though the error sounds like that.

What happens is:

   try:
      from httplib2 import SSLHandshakeError <-- fails
      import Queue
      import urlparse
      import cookielib
   except ImportError: <- this is meant for people who run python 3
      from ssl import SSLError as SSLHandshakeError <-- this also works on py2
      import queue as Queue <-- but this doesn't!


I think we should probably change those blocks to explicit blocks, i.e.

   if sys.version_info[0] == 2:
      from httplib2 import SSLHandshakeError
   else:
      ...

However, that would just change the error to

Traceback (most recent call last):
  File "C:\rewrite\pwb.py", line 123, in <module>
    tryimport_pwb()
  File "C:\rewrite\pwb.py", line 30, in tryimport_pwb
    import pywikibot
  File "C:\rewrite\pywikibot\__init__.py", line 412, in <module>
    from .page import Page, ImagePage, Category, Link, User, ItemPage,
PropertyPage, Claim
  File "C:\rewrite\pywikibot\page.py", line 17, in <module>
    import pywikibot.site
  File "C:\rewrite\pywikibot\site.py", line 32, in <module>
    from pywikibot import pagegenerators
  File "C:\rewrite\pywikibot\pagegenerators.py", line 31, in <module>
    from pywikibot.comms import http
  File "C:\rewrite\pywikibot\comms\http.py", line 35, in <module>
    from httplib2 import SSLHandshakeError
ImportError: No module named httplib2

which still needs the 'You probably forgot the submodules' clarification

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to