Gourmet 0.16 crashes when printing on Ubuntu 13.04

Asked by mario on 2013-10-27

When i try to print always crashes.
I have tried uninstalling (erasing the configuration file) and reinstalling but wihout solving the issue. With the previous version i could print.
I use the Gourmet in italian language and when i run it from a terminal and try to print, the last lines of the terminal output are:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/import_export/pdf_plugin/print_plugin.py", line 73, in custom_widget_apply
    self.args = self.ppt.get_args_from_opts(self.opts)
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/import_export/pdf_plugin/pdf_exporter.py", line 915, in get_args_from_opts
    args['pagesize'] = self.page_sizes[opts[self.OPT_PS][1]] # PAGE SIZE
KeyError: None
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gourmet/plugins/import_export/pdf_plugin/print_plugin.py", line 129, in begin_print
    pe = pdf_exporter.PdfExporterMultiDoc(self.rd,self.recs,fn,pdf_args=self.args,
AttributeError: PDFRecipePrinter instance has no attribute 'args'

thank you

Question information

English Edit question
Gourmet Edit question
No assignee Edit question
Solved by:
Bernhard Reiter
Last query:
Last reply:
Bernhard Reiter (ockham-razor) said : #1

Is this happening with all of your recipes, or only with some of them?
Please send me your recipes.db file found in ~/.gourmet to my email address found at https://launchpad.net/~ockham-razor

mario (marava1) said : #2

I have tried to print some random recipe, not the all ones.
In half an hour i wil send to you the recipes DB

Best Bernhard Reiter (ockham-razor) said : #3

I found the origin of your problem. Gourmet is looking for translated strings in ~/.gourmet/guiprefs (in Italian, in your case), but the strings stored there are in English. To solve it, please edit ~/.gourmet/guiprefs. Look for a line that reads


Two lines below is probably a line reading


Replace that latter line by


Now, look for


If you find that line, there's probably a line reading


two lines below. Replace that latter line by


Finally, look for


If you find such a line, there's something else to replace two lines below. That line probably reads


Replace it by

S'Orientamento verticale'

Afterwards, save and close that file, and launch Gourmet. Please tell me if printing then works for you. I'm going to fix this issue in Gourmet' source code and release 0.16.2 soonish.

Bernhard Reiter (ockham-razor) said : #4

I've opened issue #730 https://github.com/thinkle/gourmet/issues/730 to document this bug.

mario (marava1) said : #5

Thanks Bernhard Reiter, that solved my question.

mario (marava1) said : #6

You are very great. Now Gourmet works and prints ok. Really thank you for your attention, speed and precision.
I am sorry that I could not solve the issue by myself. ..but.. thanks again

Bernhard Reiter (ockham-razor) said : #7

You're welcome, glad to help!