Automatik created this task. Automatik added a subscriber: Automatik. Automatik added a project: pywikibot-core. Restricted Application added subscribers: Aklapper, pywikipedia-bugs.
TASK DESCRIPTION I often have scripts (launched with cron via tool labs) that ask me for password, whereas I've logged in my bot once and for all, normally. Often, the bot works whitout asking for any password, sometimes he asks one. How can the bot disconnect ? What I can do to avoid that?
Here an example of error log:
``` Password for user Botomatik on wiktionary:fr No characters will be shown: /usr/lib/python2.7/getpass.py:83: GetPassWarning: Can not control e cho on the terminal. passwd = fallback_getpass(prompt, stream) Warning: Password input may be echoed. Traceback (most recent call last): File "pywikibot/pywikibot-compat/langues-json.py", line 270, in <module> maj_liste() File "pywikibot/pywikibot-compat/langues-json.py", line 222, in maj_liste sauvegarde(Page_sortie, contenu, summary=u'Mise à jour automatique de la liste') File "pywikibot/pywikibot-compat/langues-json.py", line 246, in sauvegarde PageCourante.put(Contenu, summary, minorEdit=False) File "/data/project/botomatik/pywikibot/pywikibot-compat/wikipedia.py", line 2154, in put sysop=sysop) File "/data/project/botomatik/pywikibot/pywikibot-compat/wikipedia.py", line 2018, in _getActionUser self.site().forceLogin(sysop=sysop) File "/data/project/botomatik/pywikibot/pywikibot-compat/wikipedia.py", line 6722, in forceLogin if loginMan.login(retry=True): File "/data/project/botomatik/pywikibot/pywikibot-compat/login.py", line 337, in login password=True) File "/data/project/botomatik/pywikibot/pywikibot-compat/wikipedia.py", line 10307, in input data = ui.input(question, password) File "/data/project/botomatik/pywikibot/pywikibot-compat/userinterfaces/terminal_interface_base.py", line 140, in input text = getpass.getpass('') File "/usr/lib/python2.7/getpass.py", line 83, in unix_getpass passwd = fallback_getpass(prompt, stream) File "/usr/lib/python2.7/getpass.py", line 118, in fallback_getpass return _raw_input(prompt, stream) File "/usr/lib/python2.7/getpass.py", line 135, in _raw_input raise EOFError EOFError ``` Thank you by advance
TASK DETAIL https://phabricator.wikimedia.org/T100980
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Automatik Cc: pywikipedia-bugs, Aklapper, Automatik, jayvdb
Sitic added a subscriber: Sitic. Sitic added a comment.
You should set up a password file, where the password to the bot's account is stored.
See step 5 in https://wikitech.wikimedia.org/wiki/User:Russell_Blau/Using_pywikibot_on_Lab...
Make sure to `chmod 600` it, so that no one else can read it.
TASK DETAIL https://phabricator.wikimedia.org/T100980
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Sitic Cc: Sitic, Aklapper, Automatik, jayvdb, pywikipedia-bugs
Automatik added a comment.
Step 5 says: "Create a file in your .pywikibot directory", but I don't have any .pywikibot directory
TASK DETAIL https://phabricator.wikimedia.org/T100980
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Automatik Cc: Sitic, Aklapper, Automatik, jayvdb, pywikipedia-bugs
jayvdb added a subscriber: jayvdb. jayvdb closed this task as "Resolved". jayvdb claimed this task. jayvdb added a comment.
I am pretty confident that the password file can be in any directory, even with compat. Just put the location of the file into the `user-config.py` variable `password_file`.
And if you have problems, I strongly suggest that you migrate to using pywikibot-core. Come on IRC https://phabricator.wikimedia.org/tag/pywikibot-core/ if you need help converting to pywikibot-core. Or send me your scripts via email and I will send you back a core version of the scripts.
TASK DETAIL https://phabricator.wikimedia.org/T100980
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: jayvdb, Sitic, Aklapper, Automatik, pywikipedia-bugs
jayvdb edited projects, added pywikibot-compat; removed pywikibot-core. jayvdb set Security to None.
TASK DETAIL https://phabricator.wikimedia.org/T100980
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: jayvdb, Sitic, Aklapper, Automatik, Anshoe, pywikipedia-bugs
jayvdb changed the task status from "Resolved" to "Invalid".
TASK DETAIL https://phabricator.wikimedia.org/T100980
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb Cc: jayvdb, Sitic, Aklapper, Automatik, Anshoe, pywikipedia-bugs
Automatik added a comment.
In the meantime I resolved the problem by adding the variable "password_file" to my user-config.py, and I'm going to migrate to core as soon as possible (via pywikibot/core/scripts/maintenance/compat2core.py (which is not complete since it does'nt convert function names when they are used via "from wikipedia import *"). Thank you for the aid proposal.
TASK DETAIL https://phabricator.wikimedia.org/T100980
EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: jayvdb, Automatik Cc: jayvdb, Sitic, Aklapper, Automatik, Anshoe, pywikipedia-bugs
pywikipedia-bugs@lists.wikimedia.org