Forums

Resetting Web2py Administrator password - "raw_input not defined" error

Running Python 3.7 with Web2py 2.21.1

I've tried running this command in a bash console for the virtual environment of my web2py installation navigated to my web2py folder:

python -c "from gluon.main import save_password; save_password(raw_input('admin password: '),443)"

but I get this error:

Traceback (most recent call last): File "<string>", line 1, in <module> NameError: name 'raw_input' is not defined

Any suggestions on how to get past this?

Thanks.

Thanks for the message! If you're using Python 3.x, you can just re-run the command replacing raw_input with input.

I solved this issue. The raw_input function is not needed.

This command worked:

python -c "from gluon.main import save_password; save_password('mynewpassword',443)"

Glad to hear that you made it work!