py4web - cannot get logged in

101 views
Skip to first unread message

Jim S

unread,
Dec 19, 2019, 11:14:20 AM12/19/19
to web2py-users
python3 -m pip install --upgrade py4web
py4web-start apps

Entered my password


I am asked for a password - no matter what I do, I can't get past this page.

At first I was getting this error:

ERROR:root:Traceback (most recent call last):
 
File "/home/jim/.local/lib/python3.7/site-packages/py4web/core.py", line 473, in wrapper
    ret
= func(*func_args, **func_kwargs)
 
File "/home/jim/.local/lib/python3.7/site-packages/py4web/core.py", line 439, in wrapper
    ret
= func(*args, **kwargs)
 
File "apps/_dashboard/__init__.py", line 56, in login
    valid
= password and CRYPT()(password)[0] == os.environ['PY4WEB_PASSWORD']
 
File "/usr/lib/python3.7/os.py", line 679, in __getitem__
   
raise KeyError(key) from None
KeyError: 'PY4WEB_PASSWORD'

I created the environment variable and stored my plain text password there.  Now this error is gone, but still not working.

I can see that password.txt was created in the directory from which I initiated the py4web-start command.

I restart py4web and the password still doesn't work.

I deleted password.txt and restarted - was asked for the password and I entered it.

Still no luck.  

I've had py4web running successfully in the past.  Just now sure what has happened now that is preventing me from logging in.

-Jim


Massimo Di Pierro

unread,
Dec 25, 2019, 1:45:06 PM12/25/19
to web2py-users
I posted a new version. Should solve this problem. Please let me know.

Jim S

unread,
Dec 25, 2019, 3:30:42 PM12/25/19
to web2py-users
Massimo

I did the same,

python3 -m pip install --upgrade py4web
py4web-start apps

When I started, it asked for my password.  When I tried in the the login page I again got the message about the env var not being set.  If I set the env var to the same as my password (mine is only 2 characters, is that a problem?), I have the same results as in the original message.

I get the same behavior on my work computer and my home computer.  Both running Ubuntu 19.10

-Jim

Massimo Di Pierro

unread,
Dec 26, 2019, 3:17:45 AM12/26/19
to web2py-users
Please try delete apps and then rerun "py4web-start apps". I suspect you have an older _dashboard.
You may also try delete only apps/_dashboard and run "py4web-start -c apps". It will reinstall missing apps only.

Jim Steil

unread,
Dec 26, 2019, 9:17:00 AM12/26/19
to web...@googlegroups.com
That fixed it.

Thanks Massimo

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/hu6MRIMswEo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/18ccda76-3f22-4a45-9564-3125044c05b9%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages