2.20.4 and sessions2trash failure

52 views
Skip to first unread message

DaneW

unread,
May 11, 2020, 6:35:39 PM5/11/20
to web2py-users
I am running web2py on PythonAnywhere under Python 2.17.12.  I run a copy of sessions2trash as a scheduled task via "python /home/web2py/web2py.py -S myapp -M -R /home/web2py/applications/myapp/scripts/sessions2trash.py -A -o -x 3600 -f". It has worked fine for over a year.

I just upgraded to 20.20.4 from 2.18.4 and my scheduled session2trash run failed with an error in web2py.py line 28 - folder = sys.argv[fi] IndexError: list index out of range

It seems that web2py is now trying to interpret that -f parameter as a folder rather than the force-expiry parameter that was meant for sessions2trash.

I have fixed the issue by changing the code in my copy of sessions2trash to accept either -y or --force_expiry instead of the normal -f or --force parameters and using one of these in the command line.

But why did this start to happen now?  

Val K

unread,
May 13, 2020, 8:12:14 PM5/13/20
to web2py-users
Hi, DaneW!
- yes,  it is bug - I made the PR
https://github.com/web2py/web2py/pull/2323
Reply all
Reply to author
Forward
0 new messages