Python & Jade iteration of a dictionary : ValueError: too many values to unpack

387 Views Asked by At

I have the following dictionary i want to iterate with pyjade:

stations = {'ren': 'RENA', 'hum': 'Hummelvoll'}

In my index.jade i have the following snippet:

each val, index in stations
    li= index + ': ' + val

This raises a

"ValueError: too many values to unpack"

error. The snippet is directly taken from http://jade-lang.com/reference/iteration/

I am sure the dictonary is available to be parsed with jade.

Using "=stations['ren']" renders correctly to "RENA".

When i iterate a tuple or list, the page renders correctly.

Is this a bug, do i need to include something else, or does jade not support the use of dictonaries like the ones i would like to use?

0

There are 0 best solutions below