thinkle / gourmet

Gourmet Recipe Manager
GNU General Public License v2.0
341 stars 141 forks source link

Export and Import seem to be broken on Flatpak version 1.0.1 #1027

Open develroo opened 2 years ago

develroo commented 2 years ago

Not sure when this started happening but both import a web page and export a recipe seem to be broken.

When I try to save a recipe as PDF, EPUB, MCB or even GRMT it says it completed successfully but the filesize is zero. It seems TXT,MMF and HTML work though.


emit error 1 Error during exporter Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/gourmet/threadManager.py", line 104, in run
    self.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 88, in do_run
    self._write_text_()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 153, in _write_text_
    if self.do_markup:  txt=self.handle_markup(txt)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 313, in handle_markup
    ai.get_font(fd, None, None)
TypeError: Pango.AttrIterator.get_font() takes exactly 2 arguments (4 given)

emit done
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
emit error 1 Error during exporter Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/gourmet/threadManager.py", line 104, in run
    self.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 88, in do_run
    self._write_text_()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 153, in _write_text_
    if self.do_markup:  txt=self.handle_markup(txt)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 313, in handle_markup
    ai.get_font(fd, None, None)
TypeError: Pango.AttrIterator.get_font() takes exactly 2 arguments (4 given)

emit done
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
emit error 1 Error during Exporter Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/gourmet/threadManager.py", line 104, in run
    self.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 582, in do_run
    e.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 88, in do_run
    self._write_text_()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 153, in _write_text_
    if self.do_markup:  txt=self.handle_markup(txt)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 313, in handle_markup
    ai.get_font(fd, None, None)
TypeError: Pango.AttrIterator.get_font() takes exactly 2 arguments (4 given)

emit done
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
emit error 1 Error during exporter Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/gourmet/threadManager.py", line 104, in run
    self.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 88, in do_run
    self._write_text_()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 153, in _write_text_
    if self.do_markup:  txt=self.handle_markup(txt)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 313, in handle_markup
    ai.get_font(fd, None, None)
TypeError: Pango.AttrIterator.get_font() takes exactly 2 arguments (4 given)

emit done
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
emit error 1 Error during Exporter Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/gourmet/threadManager.py", line 104, in run
    self.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 582, in do_run
    e.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 88, in do_run
    self._write_text_()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 153, in _write_text_
    if self.do_markup:  txt=self.handle_markup(txt)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 313, in handle_markup
    ai.get_font(fd, None, None)
TypeError: Pango.AttrIterator.get_font() takes exactly 2 arguments (4 given)

emit done
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
WARNING <bound method UnitDisplayDatabasePlugin.get_amount_and_unit_hook of <unit_display_prefs.UnitDisplayDatabasePlugin object at 0x7f89edd558e0>> did not return args,kwargs
emit error 1 Error during Exporter Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/gourmet/threadManager.py", line 104, in run
    self.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 582, in do_run
    e.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 88, in do_run
    self._write_text_()
  File "/app/lib/python3.8/site-packages/gourmet/plugin_loader.py", line 440, in _
    retval = f(self,*args,**kwargs)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 153, in _write_text_
    if self.do_markup:  txt=self.handle_markup(txt)
  File "/app/lib/python3.8/site-packages/gourmet/exporters/exporter.py", line 313, in handle_markup
    ai.get_font(fd, None, None)
TypeError: Pango.AttrIterator.get_font() takes exactly 2 arguments (4 given)

emit done

But then when I try to import from a web page is also fails even with a URL it has imported from before.

URL=https://www.genaw.com/lowcarb/appetizer_meatballs.html


emit done
activate GenericWebImporter for pluggable <gourmet.importers.importManager.ImportManager object at 0x7f8a0a344be0>
emit error 1 Error during Downloading https://www.genaw.com/lowcarb/appetizer_meatballs.html Traceback (most recent call last):
  File "/app/lib/python3.8/site-packages/gourmet/threadManager.py", line 104, in run
    self.do_run()
  File "/app/lib/python3.8/site-packages/gourmet/importers/webextras.py", line 24, in do_run
    self.read()
  File "/app/lib/python3.8/site-packages/gourmet/importers/webextras.py", line 29, in read
    sock = urllib.request.urlopen(self.url)
  File "/app/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/app/lib/python3.8/urllib/request.py", line 531, in open
    response = meth(req, response)
  File "/app/lib/python3.8/urllib/request.py", line 640, in http_response
    response = self.parent.error(
  File "/app/lib/python3.8/urllib/request.py", line 569, in error
    return self._call_chain(*args)
  File "/app/lib/python3.8/urllib/request.py", line 502, in _call_chain
    result = func(*args)
  File "/app/lib/python3.8/urllib/request.py", line 649, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 406: Not Acceptable

emit done

I could understand if I installed the locally I could be missing some dependancy but I am on Debian 11/testing and running it as a flatpak that ought not to be possible?

The PDF/EPUB sounds like maybe a ghostscipt dependancy is missng but the output is a little confusing ot me, especially as it says it completed sucessfully.

Any ideas how to isolate what is going on here?

Thanks in advance.

cydanil commented 2 years ago

Thanks for the report.
Note that Gourmet 1.0.1 is not an official version, but rather me messing around trying to revive the project.
You're welcome to look at my fork, if you prefer: https://github.com/GourmandRecipeManager/gourmand/releases

Cyril

develroo commented 2 years ago

Oh, did not know there was a fork? I see you have a flatpak too. 1.0.0 I'll check it out.

Cheers

fbobraga commented 2 years ago

@develroo there is a build (or python module) that works on ARM? Related: https://github.com/thinkle/gourmet/issues/1023

develroo commented 2 years ago

@develroo there is a build (or python module) that works on ARM? Related: #1023

I don't know to be honest. But it should not be too hard to make one for arm64. Python is already well established on Pis so I guess no one has tried it. I might if I get some time as the flatpak manifest has already been written so all you need to do is tweak it for a differen arch

fbobraga commented 2 years ago

yeap (and the python module worked here until the last update on Manjaro, that changed python 3.9 to 3.10...)