thinkle / gourmet

Gourmet Recipe Manager
GNU General Public License v2.0
339 stars 137 forks source link

"Yield:" in mealmaster recipe body causes import failure #271

Closed ockham closed 11 years ago

ockham commented 11 years ago

Converted from SourceForge issue 3179434, submitted by SourceForge user brianh32 on 2011-02-13 01:42:45 UTC.

The presence of a line beginning with:

Yield:

in the recipe body of a mealmaster (.mmf) file causes import to fail with the following error:

Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/gourmet/threadManager.py", line 97, in run self.do_run() File "/usr/lib/python2.7/site-packages/gourmet/importers/plaintext_importer.py", line 36, in do_run self.handle_line(l) File "/usr/lib/python2.7/site-packages/gourmet/plugins/import_export/mealmaster_plugin/mealmaster_importer.py", line 158, in handle_line self.commit_rec() File "/usr/lib/python2.7/site-packages/gourmet/plugins/import_export/mealmaster_plugin/mealmaster_importer.py", line 267, in commit_rec importer.Importer.commit_rec(self) File "/usr/lib/python2.7/site-packages/gourmet/importers/importer.py", line 189, in commit_rec self._move_to_instructions(self.rec,'servings') File "/usr/lib/python2.7/site-packages/gourmet/importers/importer.py", line 156, in _move_to_instructions text_to_add = gourmet.gglobals.REC_ATTR_DIC[attr]+': '+recdic[attr] KeyError: 'servings'

See the attached file for an example.

yieldfail.mmf:

---------- Recipe via Meal-Master (tm) v8.02

  Title: Lobster/ Mache Salad with Ginger-Vanilla Bean Vinaigrette

Categories: Chicken, French, Mansion Yield: 4 servings

2 lobsters (each about 1 pounds) 1 pound mache lettuce (see cook's notes)

Ginger-Vanilla Bean Vinaigrette 1 vanilla bean, split lengthwise 3 ounces fresh ginger, peeled and julienned 2 shallots, peeled and chopped 1/2 cup sugar 1 cup good white wine 1 cup extra-virgin olive oil 1 ounce sesame oil Salt, freshly ground pepper to taste Half of a small red pepper, diced Half of a small papaya, diced

Cook's notes: Mache lettuce may be special-ordered at some supermarkets; you may wish to use the exotic mixtures of prepared lettuces available at larger stores.

Preliminaries: Cook the lobster according to your own favorite method. Remove the heads and tails, reserving them for garnish; cover and chill. Remove the meat, cover and chill.

Wash and pat dry the lettuce. Cover and chill.

Prepare the dressing: Combine vanilla, ginger, shallots, sugar and wine in a stainless steel pan over medium heat. Cook until mixture reaches the consistency of a syrup. Let cool thoroughly. Add olive and sesame oil, seasonings, red pepper and papaya.

Presentation: Toss the lobster meat in the vinaigrette. Mound the lettuce onto a chilled serving platter. Spoon lobster and some of the vinaigrette onto the top of the mache, then garnish with the lobster heads and tails.

Yield: Makes four servings.


ockham commented 11 years ago

Duplicate of #288.