Yes, I agree that the line you identified is the ultimate source of the 
error, but it is not the line that actually results in the exception, which 
is in the view. The problem, is the code in the view expects the menu items 
to have a particular structure, and the item you have added does not match 
that structure (hence the index out of range error). I suggest you look at 
the menu code in the layout to see where things are going wrong. You can 
either change the code in the layout or your menu code.

Also, instead of the code below, why not just:

response.menu[1][3] = [
    (T('Dashboard'), False, URL('main', 'students')),
    ...
]

Anthony

On Thursday, April 11, 2019 at 5:59:04 PM UTC-4, lucas wrote:
>
> alright, so just to be absolutely sure.  i copied the layout.html and the 
> default/index.html files from the 2.18.5 welcome app and stuck them in the 
> proper places in my app.  i still get the same error.  i do NOT get the 
> error if i comment out the separator line, as commented below.  here is all 
> of my code in the menu.py file as it stands now with layout.html and 
> index.html being the unmodified default:
>
> # -*- coding: utf-8 -*-
> response.title = "IQa weInstruct:::uLearn"
> response.menu = [
>     [T('Lectures'), False, URL('default', 'subjects')],
>     [T('Students'), False, URL('main', 'students'), []],
>     [T('Professors'), False, URL('main', 'professors'), []],
>     [T('Blog'), False, URL('default', 'blog')],
>     [T('News'), False, URL('default', 'news')]
>     ]
>
> if auth.is_logged_in():
>     response.menu[1][0] = T('Student:')
>     response.menu[1][3].append((T('Dashboard'), False, URL('main', 
> 'students')))
>     #response.menu[1][3].append(A('', _class="divider"))
>     response.menu[1][3].append((T('Assessments'), False, None))
>     response.menu[1][3].append((T('History'), False, None))
>     response.menu[1][3].append((T('Join a Class'), False, None))
>
>

-- 
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 the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to