PYTHON 'Unicode' object does not support item assignement
<p>Need some help please with this error :</p>

<p><strong>TypeError</strong>: 'unicode' object does not support item assignment</p>

<p><strong>Ligne</strong> : menuDic[str(menu.id)]['menuDishes'][str(d.dish.dishType.name)]['dishTypeName'][str(d.dish.id)] = {}</p>

<pre><code>def getDishOfTheWeek():
    menuDic = Ddict(dict)
    for menu in Menus.select().where(state = True):
        menuDic[str(menu.id)]={}
        menuDic[str(menu.id)]['menuId']=menu.id
        menuDic[str(menu.id)]['menuName']=menu.name
        menuDic[str(menu.id)]['menuCountry']=menu.country.name
        menuDic[str(menu.id)]['menuDishes']={}
        for d in DishMenuRels.select().where(menu = menu.id).join(Dishes).join(DishTypes).order_by('name')
            menuDic[str(menu.id)]['menuDishes'][str(d.dish.dishType.name)] = {}
            menuDic[str(menu.id)]['menuDishes'][str(d.dish.dishType.name)]['dishTypeName'] = d.dish.dishType.name
            menuDic[str(menu.id)]['menuDishes'][str(d.dish.dishType.name)]['dishTypeName'][str(d.dish.id)] = {}
            menuDic[str(menu.id)]['menuDishes'][str(d.dish.dishType.name)]['dishTypeName'][str(d.dish.id)]['dishId'] = d.dish.id
            menuDic[str(menu.id)]['menuDishes'][str(d.dish.dishType.name)]['dishTypeName'][str(d.dish.id)]['dishState'] = d.dish.name
            menuDic[str(menu.id)]['menuDishes'][str(d.dish.dishType.name)]['dishTypeName'][str(d.dish.id)]['dishType'] = d.dish.price
            menuDic[str(menu.id)]['menuDishes'][str(d.dish.dishType.name)]['dishTypeName'][str(d.dish.id)]['dishName'] = d.dish.country.name
    print json.dumps(menuDic, indent=5, sort_keys=True)
</code></pre>

<p>Thanks </p>
