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

Language:
English Edit question
Status:
Solved
For:
Gourmet Edit question
Assignee:
No assignee Edit question
Solved by:
Bernhard Reiter
Solved:
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

sS'page_size'

Two lines below is probably a line reading

S'Letter'

Replace that latter line by

S'Lettera'

Now, look for

sS'page_layout'

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

S'Plain'

two lines below. Replace that latter line by

S'Normale'

Finally, look for

sS'orientation'

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

S'Portrait'

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

Wow!
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
mario

Bernhard Reiter (ockham-razor) said : #7

You're welcome, glad to help!