1

I cannot print any recipe from my installed « Gourmet Recipe Manager ». I keep getting the following error messages. Is this a Ubuntu problem or a specific problem with the Gourmet software ?

My file python.py reads:

sublabel=_("To print, activate a plugin that provides printing support, such as the 'Printing & PDF export' plugin."), )

Where can I get this Printing & PDF export' plugin ?

What's the solution to fix this ?

Thanks in advance.

Reference: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gourmet/exporters/printer.py", >line 76, in print_recipes **kwargs)

File "/usr/lib/python2.7/dist-packages/gourmet/exporters/printer.py", >line 15, in init raise NotImplementedError NotImplementedError

$ apt-cache policy gourmet : 
   Installed: 0.17.4-6 
   Candidate: 0.17.4-6 
   Version table: 
       *** 0.17.4-6 500 
          500 ca.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
          500 ca.archive.ubuntu.com/ubuntu bionic/universe i386 Packages 
          100 /var/lib/dpkg/status 
3
  • What is your Ubuntu version? How did you installed gourmet? Please add output of apt-cache policy gourmet to the question. – N0rbert Nov 2 '19 at 10:56
  • To N0rbert: Here's the output of my apt-cache policy gourmet : Installed: 0.17.4-6 Candidate: 0.17.4-6 Version table: *** 0.17.4-6 500 500 ca.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages 500 ca.archive.ubuntu.com/ubuntu bionic/universe i386 Packages 100 /var/lib/dpkg/status – André A. Nov 2 '19 at 20:00
  • To N0rbert: I did implement the procedure/instruction per « Answer 1 » below. I'm no longer getting the error messages, but I still cannot print any recipe. Looks like no printout is sent to my printer queue. – André A. Nov 2 '19 at 20:26
0

I see that PDF export works out-the-box in Ubuntu 14.04 LTS (EOL or ESM now) and 16.04 LTS.
The Ubuntu 16.04 LTS has needed file print_plugin.py in place.

But Ubuntu 18.04 LTS and 20.04 LTS do not have this file.
So it is a packaging bug. I reported it as bug 1851016 affecting these Ubuntu versions.

If you really need this functionality you can download packages from 16.04 LTS repository with commands below:

cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pillow/python-imaging_3.1.2-0ubuntu1.4_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gourmet/gourmet_0.17.4-3_all.deb
sudo apt install ./python-imaging_3.1.2-0ubuntu1.4_all.deb
sudo apt install ./gourmet_0.17.4-3_all.deb

and then pin/lock gourmet package version:

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-gourmet
Package: gourmet
Pin: version 0.17.4-3
Pin-Priority: 1337
EOF

Then you should open Gourmet, click SettingsPlugins, go to Importer/Exporter tab and enable Printing & PDF export plugin if it is not enabled.

Then printing will work as expected.

2
  • Hi, Thanks for your answers. I'm no longer getting the error messages, but I cannot still print any recipe. Looks like no printout is sent to my printer queue. – André A. Nov 2 '19 at 20:24
  • This is a bit strange - I can print to file and get PDF from the program on 18.04 LTS. Recipe export to PDF works as expected too. So I'll recommend to get PDF first and then print it from pdf-viewer :) – N0rbert Nov 2 '19 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.