Error in app: the variable was lost

34 views
Skip to first unread message

Константин Комков

unread,
Jun 22, 2019, 3:25:23 AM6/22/19
to web2py-users
In my controller I have function:
def send_app():
    if session.abit_email is None:redirect('https://oas.timacad.ru/application', client_side=True)
    const = {rec.NAME:rec.TEXT for rec in db((db.t_const.NAME=='RECTOR_RANKU') | (db.t_const.NAME=='PREDSEDU') | (db.t_const.NAME=='VUZ')).select(db.t_const.NAME,db.t_const.TEXT)}
    rectorRank = const['RECTOR_RANKU']
    rectorName = const['PREDSEDU']
    vuzName = const['VUZ']
    statement=create_application_for_edit(rectorRank,rectorName,vuzName)
    ...
and it's code create_application_for_edit function:
def create_application_for_edit(rectorRank,rectorName,vuzName):
    ...
    if session.edu_course_name!='Без курсов':
        edu = edu + 'Закончил(-а) подготовительные курсы {0}: <b>{1}</b>. '.format(vuzName,session.edu_course_name)
    ...
Today I see one user get error 10 times:
NameError(name 'vuzName' is not defined) 
After that I see automatic letter from him on email. It means that error was and something happened and error was gone and that user can send automatic letter from my function. How it is possible? 

Anthony

unread,
Jun 22, 2019, 9:41:50 AM6/22/19
to web2py-users
Can you show the full traceback?

Константин Комков

unread,
Jun 22, 2019, 9:45:09 AM6/22/19
to web...@googlegroups.com
Yes, but only on monday(

сб, 22 июн. 2019 г., 16:41 Anthony <abas...@gmail.com>:
--
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/CtsITs1D4po/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/da61f285-7624-4783-900a-a25a03171570%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Константин Комков

unread,
Jun 24, 2019, 2:45:26 AM6/24/19
to web2py-users
Ohh, sorry. I found that error - my mistake.
Reply all
Reply to author
Forward
0 new messages