Imamadmad created this task. Imamadmad added a subscriber: Imamadmad. Imamadmad added projects: Pywikibot-login.py, pywikibot-core. Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION I'm trying to create a bot and log in for the first time. I've generated the family and user files, and then navigated to the pywikibot folder to access login.py, but I keep getting an error message as follows:
``` Don'tNeedToKnow@Imamadmad /cygdrive/c/core/pywikibot $ python login.py Traceback (most recent call last): File "login.py", line 20, in <module> import pywikibot ImportError: No module named pywikibot
``` I haven't touched any files at all apart from running generate_family_file.py and generate_user_files.py. The version of pywikibot is the one from http://tools.wmflabs.org/pywikibot/ last updated on May 4th, but this has been happening for almost a week now. It was about a week ago that I first tried installing the software. I don't know what exactly the problem is. The above error message is all I've got. I can post further if there are more things you can tell me to do to expose the cause of the problem.
To give full list of what files are available and where, from where they've been placed by default:
``` Don'tNeedToKnow@Imamadmad /cygdrive/c/core $ ls ChangeLog logs setup.py CREDITS pwb.py tests externals pywikibot tox.ini ez_setup.py README.rst user-config.py generate_family_file.py README-conversion.txt user-config.py.sample generate_user_files.py requirements.txt LICENSE scripts
Don'tNeedToKnow@Imamadmad /cygdrive/c/core $ cd pywikibot
Don'tNeedToKnow@Imamadmad /cygdrive/c/core/pywikibot $ ls __init__.py config2.pyc exceptions.pyc login.pyc throttle.py __init__.pyc data families page.py throttle.pyc backports.py date.py family.py page.pyc titletranslate.py backports.pyc diff.py family.pyc pagegenerators.py tools bot.py diff.pyc fixes.py plural.py userinterfaces bot.pyc echo.py i18n.py plural.pyc version botirc.py echo.pyc i18n.pyc site.py version.py comms editor.py interwiki_graph.py site.pyc version.pyc compat epydoc.cfg logentries.py textlib.py weblib.py config2.py exceptions.py login.py textlib.pyc xmlreader.py ```
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Imamadmad Cc: pywikipedia-bugs, Imamadmad, Aklapper, jayvdb
Imamadmad edited the task description. Imamadmad set Security to None.
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Imamadmad Cc: pywikipedia-bugs, Imamadmad, Aklapper, jayvdb
XZise added a subscriber: XZise. XZise added a comment.
Do the following inside of the core directory:
Don'tNeedToKnow@Imamadmad /cygdrive/c/core $ python pwb.py login
pwb.py does add the core directory to the `PATH` variable so that python sees the pywikibot directory. There are other ways to fix this like adding the core directory (or any directory containing the pywikibot directory) to `PATH` or `PYTHON_PATH`.
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: XZise, Imamadmad, Aklapper, jayvdb, pywikipedia-bugs
XZise added a subscriber: jayvdb.
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: jayvdb, XZise, Imamadmad, Aklapper, pywikipedia-bugs
Imamadmad added a comment.
In https://phabricator.wikimedia.org/T97992#1256635, @XZise wrote:
Do the following inside of the core directory:
Don'tNeedToKnow@Imamadmad /cygdrive/c/core $ python pwb.py login
pwb.py does add the core directory to the `PATH` variable so that python sees the pywikibot directory. There are other ways to fix this like adding the core directory (or any directory containing the pywikibot directory) to `PATH` or `PYTHONPATH`.
**Edit:** It's `PYTHONPATH` not `PYTHON_PATH`, thanks @jayvdb for the reminder.
Thank you so much for the help! This wasn't made clear in the documentation on mediawiki.org. Thanks so much for telling me!
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Imamadmad Cc: jayvdb, XZise, Imamadmad, Aklapper, pywikipedia-bugs
Mpaa added a subscriber: Mpaa. Mpaa added a comment.
Clarified in https://www.mediawiki.org/wiki/Manual:Pywikibot/Basic_use#Use Please amend if not clear or correct.
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Mpaa Cc: Mpaa, jayvdb, XZise, Imamadmad, Aklapper, pywikipedia-bugs
Mpaa closed this task as "Resolved".
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Mpaa Cc: Mpaa, jayvdb, XZise, Imamadmad, Aklapper, pywikipedia-bugs
XZise added a comment.
Well the problem is that this talks about core and compat now.
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: XZise Cc: Mpaa, jayvdb, XZise, Imamadmad, Aklapper, pywikipedia-bugs
Mpaa added a comment.
Tried to divide the two.
TASK DETAIL https://phabricator.wikimedia.org/T97992
REPLY HANDLER ACTIONS Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign <username>.
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Mpaa Cc: Mpaa, jayvdb, XZise, Imamadmad, Aklapper, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org