← Back to team overview

gourmet team mailing list archive

[Question #689424]: Gourmet recipe manager export error

 

New question #689424 on Gourmet:
https://answers.launchpad.net/gourmet/+question/689424

I've tried to export all recipes to different formats as a backup but get an error. Here's the traceback details:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gourmet/threadManager.py", line 97, in run
    self.do_run()
  File "/usr/lib/python2.7/dist-packages/gourmet/plugin_loader.py", line 394, in _
    retval = f(self,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/gourmet/exporters/exporter.py", line 565, in do_run
    e.do_run()
  File "/usr/lib/python2.7/dist-packages/gourmet/exporters/exporter.py", line 79, in do_run
    self._write_text_()
  File "/usr/lib/python2.7/dist-packages/gourmet/plugin_loader.py", line 395, in _
    retval = self.run_post_hook(f.__name__,retval,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugin_loader.py", line 355, in run_post_hook
    retval = hook(retval,self,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugin.py", line 185, in do_write
    val = field_fetcher(klass.r)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/nutritional_information/export_plugin.py", line 24, in get_nutritional_info_as_text_blob
    nutinfo = nd.get_nutinfo_for_inglist(rd.get_ings(rec),rd)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/nutritional_information/nutrition.py", line 122, in get_nutinfo_for_inglist
    return NutritionInfoList([self.get_nutinfo_for_ing(i,rd, multiplier) for i in inglist],
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/nutritional_information/nutrition.py", line 116, in get_nutinfo_for_ing
    return  self.get_nutinfo_for_item(ing.ingkey,amount,ing.unit,ingObject=ing)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/nutritional_information/nutrition.py", line 128, in get_nutinfo_for_item
    ni=self.get_nutinfo(key)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/nutritional_information/nutrition.py", line 164, in get_nutinfo
    ni = self.get_nutinfo_from_desc(key)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/nutritional_information/nutrition.py", line 146, in get_nutinfo_from_desc
    matches = self.get_matches(desc)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/nutritional_information/nutrition.py", line 81, in get_matches
    words=re.split("\W",key)
  File "/usr/lib/python2.7/re.py", line 171, in split
    return _compile(pattern, flags).split(string, maxsplit)
TypeError: expected string or buffer

I can find the recipe causing the problem, delete it and proceed, but only to find another that generates the error. Any ideas what is causing the problem and how to solve it, short of logging out of the app and manually copying recipes.db?

-- 
You received this question notification because your team Gourmet Recipe
Manager is an answer contact for Gourmet.