[Bug 2064861] Re: [SRU] gourmand doesn't start
Simon Quigley
2064861 at bugs.launchpad.net
Tue Jun 4 16:16:37 UTC 2024
LGTM, it is in the Noble queue now.
Thank you!
** Also affects: gourmand (Ubuntu Noble)
Importance: Undecided
Status: New
** Also affects: extruct (Ubuntu Noble)
Importance: Undecided
Status: New
** No longer affects: gourmand (Ubuntu Noble)
** Changed in: extruct (Ubuntu Noble)
Status: New => Triaged
--
You received this bug notification because you are a member of Ubuntu
Sponsors, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2064861
Title:
[SRU] gourmand doesn't start
Status in extruct package in Ubuntu:
Confirmed
Status in gourmand package in Ubuntu:
Confirmed
Status in extruct source package in Noble:
Triaged
Bug description:
[ Impact ]
gourmand is completely unusable and will fail immediately on execution
with the error:
$ gourmand
args = Namespace(db_url='', threads=False, gourmanddir='', thread_debug_interval=5.0, thread_debug=False, debug_file='', time=False, debug=None)
Traceback (most recent call last):
File "/usr/bin/gourmand", line 33, in <module>
sys.exit(load_entry_point('gourmand==1.0.0', 'gui_scripts', 'gourmand')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/gourmand", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/gourmand/main.py", line 9, in <module>
from gourmand import (__version__, batchEditor, convert, plugin, plugin_gui,
File "/usr/lib/python3/dist-packages/gourmand/reccard.py", line 33, in <module>
from gourmand.recindex import RecIndex
File "/usr/lib/python3/dist-packages/gourmand/recindex.py", line 17, in <module>
from .importers.clipboard_importer import import_from_drag_and_drop
File "/usr/lib/python3/dist-packages/gourmand/importers/clipboard_importer.py", line 8, in <module>
from gourmand.importers.importManager import ImportManager
File "/usr/lib/python3/dist-packages/gourmand/importers/importManager.py", line 10, in <module>
from gourmand.importers.web_importer import import_urls, supported_sites
File "/usr/lib/python3/dist-packages/gourmand/importers/web_importer.py", line 6, in <module>
from recipe_scrapers import SCRAPERS, scrape_me
File "/usr/lib/python3/dist-packages/recipe_scrapers/__init__.py", line 6, in <module>
from ._abstract import AbstractScraper
File "/usr/lib/python3/dist-packages/recipe_scrapers/_abstract.py", line 13, in <module>
from ._schemaorg import SchemaOrg
File "/usr/lib/python3/dist-packages/recipe_scrapers/_schemaorg.py", line 8, in <module>
import extruct
File "/usr/lib/python3/dist-packages/extruct/__init__.py", line 1, in <module>
from ._extruct import SYNTAXES, extract
File "/usr/lib/python3/dist-packages/extruct/_extruct.py", line 9, in <module>
from extruct.dublincore import DublinCoreExtractor
File "/usr/lib/python3/dist-packages/extruct/dublincore.py", line 6, in <module>
from extruct.utils import parse_html
File "/usr/lib/python3/dist-packages/extruct/utils.py", line 5, in <module>
from extruct.xmldom import XmlDomHTMLParser
File "/usr/lib/python3/dist-packages/extruct/xmldom.py", line 9, in <module>
from lxml.etree import (
ImportError: cannot import name '_ElementStringResult' from 'lxml.etree' (/usr/lib/python3/dist-packages/lxml/etree.cpython-312-x86_64-linux-gnu.so). Did you mean: '_ElementUnicodeResult'?
Even though "gourmand" is affected but its caused by "python3-lxml"
updating to 5.2.1-1 as FFE via #2060811. And that in turn affected
python3-extruct which actually caused all the error.
[ Test Plan ]
1. install gourmand
2. Execute gourmand
If the package is not fixed it will result in the above error.
With the fixed package it will display the recipe manager with two example recipes in it.
[ Where problems could occur ]
This upstream patch is defining its own "_ElementStringResult" for compatibility. Looking at old lxml code, the definition is same as what they had at https://github.com/lxml/lxml/blob/lxml-4.9.4/src/lxml/extensions.pxi#L741 so there should not be a regression for this. But again, lxml has removed the definition and there might be some other change in lxml which is part of this removal and so there is always a chance of regression.
But again, the package is completely unusable now, there can not be a greather regression than what we currently have.
[ Other Info ]
1. The "_ElementStringResult" was a private classes of lxml and should not have been used by python3-extruct. Ref: https://bugs.launchpad.net/bugs/2059793
2. I did a apt-cache rdepends to find out other packages that might be affected by the issue of python3-extruct. But looks like "gourmand" is the only package which depends on python3-extruct.
[ Original Bug Description ]
In kubuntu 24.04 after installing gourmand it doesn't start.
If I launch it from cli I have the following output :
gourmand
args = Namespace(db_url='', threads=False, gourmanddir='', thread_debug_interval=5.0, thread_debug=False, debug_file='', time=False, debug=None)
Traceback (most recent call last):
File "/usr/bin/gourmand", line 33, in <module>
sys.exit(load_entry_point('gourmand==1.0.0', 'gui_scripts', 'gourmand')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/bin/gourmand", line 25, in importlib_load_entry_point
return next(matches).load()
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/metadata/__init__.py", line 205, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/usr/lib/python3/dist-packages/gourmand/main.py", line 9, in <module>
from gourmand import (__version__, batchEditor, convert, plugin, plugin_gui,
File "/usr/lib/python3/dist-packages/gourmand/reccard.py", line 33, in <module>
from gourmand.recindex import RecIndex
File "/usr/lib/python3/dist-packages/gourmand/recindex.py", line 17, in <module>
from .importers.clipboard_importer import import_from_drag_and_drop
File "/usr/lib/python3/dist-packages/gourmand/importers/clipboard_importer.py", line 8, in <module>
from gourmand.importers.importManager import ImportManager
File "/usr/lib/python3/dist-packages/gourmand/importers/importManager.py", line 10, in <module>
from gourmand.importers.web_importer import import_urls, supported_sites
File "/usr/lib/python3/dist-packages/gourmand/importers/web_importer.py", line 6, in <module>
from recipe_scrapers import SCRAPERS, scrape_me
File "/usr/lib/python3/dist-packages/recipe_scrapers/__init__.py", line 6, in <module>
from ._abstract import AbstractScraper
File "/usr/lib/python3/dist-packages/recipe_scrapers/_abstract.py", line 13, in <module>
from ._schemaorg import SchemaOrg
File "/usr/lib/python3/dist-packages/recipe_scrapers/_schemaorg.py", line 8, in <module>
import extruct
File "/usr/lib/python3/dist-packages/extruct/__init__.py", line 1, in <module>
from ._extruct import SYNTAXES, extract
File "/usr/lib/python3/dist-packages/extruct/_extruct.py", line 9, in <module>
from extruct.dublincore import DublinCoreExtractor
File "/usr/lib/python3/dist-packages/extruct/dublincore.py", line 6, in <module>
from extruct.utils import parse_html
File "/usr/lib/python3/dist-packages/extruct/utils.py", line 5, in <module>
from extruct.xmldom import XmlDomHTMLParser
File "/usr/lib/python3/dist-packages/extruct/xmldom.py", line 9, in <module>
from lxml.etree import (
ImportError: cannot import name '_ElementStringResult' from 'lxml.etree' (/usr/lib/python3/dist-packages/lxml/etree.cpython-312-x86_64-linux-gnu.so). Did you mean: '_ElementUnicodeResult'?
---
ProblemType: Bug
ApportVersion: 2.28.1-0ubuntu3
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: KDE
DistroRelease: Ubuntu 24.04
Package: gourmand 1.1.0+really1.1.0~rc3-3
PackageArchitecture: all
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Tags: noble third-party-packages
Uname: Linux 6.8.0-31-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
_MarkForUpload: True
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/extruct/+bug/2064861/+subscriptions
More information about the Ubuntu-sponsors
mailing list