valhallasw added a comment. Ok, with Python 3.4.0 and 2.0rc3 I can reproduce the issue in a virtualenv. The traceback is roughly what you might expect:
(venv) C:\Users\Merlijn van Deen\Downloads\core\core>python -i generate_user_files.py WARNING: Running on Windows and transliteration_target is not set. Please see https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Pywikibot/Windows Error: Python module httplib2 >= 0.6.0 is required. Traceback (most recent call last): File "generate_user_files.py", line 25, in <module> import pywikibot File "C:\Users\Merlijn van Deen\Downloads\core\core\pywikibot\__init__.py", line 40, in <module> from pywikibot.exceptions import ( File "C:\Users\Merlijn van Deen\Downloads\core\core\pywikibot\exceptions.py", line 505, in <module> import pywikibot.data.api File "C:\Users\Merlijn van Deen\Downloads\core\core\pywikibot\data\api.py", line 13, in <module> from pywikibot.comms import http File "C:\Users\Merlijn van Deen\Downloads\core\core\pywikibot\comms\http.py", line 35, in <module> import httplib2 ImportError: No module named 'httplib2' which makes sense, as pwb.py has not patched up the import paths yet. This dependency was introduced in https://phabricator.wikimedia.org/rPWBCa37652112416946ba3408b7ab8588d162b753a34 but apparently wasn't caught earlier. There are three options to solve this, 1. add externals/ to sys.path, 2. make generate_user_files.py work through pwb.py 3. tell users to install httplib2 I think 2) is probably the best option -- if generate_user_files is run directly, the user-config.py will not be in the expected location. In that case, I think we should test that `import httplib2` works, and if not, provide an error 'Please run pythn pwb.py generate_user_files instead'. In master this is not an issue because we expect users to install python-requests anyway. TASK DETAIL https://phabricator.wikimedia.org/T126880 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: valhallasw Cc: Aklapper, valhallasw, StudiesWorld, MarcoAurelio, pywikibot-bugs-list _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
