This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Login-data raising EOFError
Type: behavior Stage:
Components: None Versions: Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: Riley, gregory.p.smith, r.david.murray
Priority: normal Keywords:

Created on 2013-02-24 21:37 by Riley, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg182896 - (view) Author: Riley (Riley) Date: 2013-02-24 21:36
When running Pywikipediabot and retrieving a password I get the following error:
Password for user RileyBot on wiktionary:en: 
/usr/lib/python2.7/getpass.py:83: GetPassWarning: Can not control echo on the terminal.
  passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
Traceback (most recent call last):
  File "globalfunc1.py", line 250, in <module>
    main()
  File "globalfunc1.py", line 244, in main
    bot.run()
  File "globalfunc1.py", line 197, in run
    sandboxPage.put(translatedContent, translatedMsg)
  File "/home/riley/pywikipedia/wikipedia.py", line 1990, in put
    sysop=sysop)
  File "/home/riley/pywikipedia/wikipedia.py", line 1863, in _getActionUser
    self.site().forceLogin(sysop = sysop)
  File "/home/riley/pywikipedia/wikipedia.py", line 5861, in forceLogin
    if loginMan.login(retry = True):
  File "/home/riley/pywikipedia/login.py", line 307, in login
    password = True)
  File "/home/riley/pywikipedia/wikipedia.py", line 8927, in input
    data = ui.input(question, password)
  File "/home/riley/pywikipedia/userinterfaces/terminal_interface_base.py", line 129, 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

While this may have something to do with Pywikipediabot, it all comes down to python. Help?
msg182901 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-02-24 22:26
My guess would be that stdin is closed.  I doubt that it is a python problem.
msg182918 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2013-02-25 05:29
yeah that looks like stdin was closed or was /dev/null.
msg182919 - (view) Author: Riley (Riley) Date: 2013-02-25 05:49
The script is being run from a cronjob with saved login data. And thus, there is no stdin for cronjobs as there's no attached terminal. Reopening.
msg182920 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2013-02-25 05:52
File "/home/riley/pywikipedia/userinterfaces/terminal_interface_base.py", line 129, in input
    text = getpass.getpass('')

you can't call getpass without stdin or a terminal and expect it to do anything.  your problem is in the pywikipedia code, not Python's getpass module.

http://docs.python.org/2/library/getpass.html
History
Date User Action Args
2022-04-11 14:57:42adminsetgithub: 61493
2013-02-25 05:52:37gregory.p.smithsetstatus: open -> closed
resolution: not a bug
messages: + msg182920
2013-02-25 05:49:10Rileysetstatus: closed -> open
resolution: not a bug -> (no value)
messages: + msg182919
2013-02-25 05:29:44gregory.p.smithsetstatus: open -> closed
resolution: not a bug
messages: + msg182918
2013-02-24 22:26:06r.david.murraysetnosy: + r.david.murray
messages: + msg182901
2013-02-24 21:37:24pitrousetnosy: + gregory.p.smith
2013-02-24 21:37:00Rileycreate