Bug 1940213 - [abrt] rpmlint: __init__(): __init__.py:140:__init__:enchant.errors.DefaultLanguageNotFoundError: ca
Summary: [abrt] rpmlint: __init__(): __init__.py:140:__init__:enchant.errors.DefaultLa...
Keywords:
Status: CLOSED DUPLICATE of bug 1904399
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmlint
Version: 33
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:dc72ddf540d2875a032e3a5a52d...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-17 20:01 UTC by Ben Beasley
Modified: 2021-03-17 20:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-17 20:02:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (1.11 KB, text/plain)
2021-03-17 20:01 UTC, Ben Beasley
no flags Details
File: cpuinfo (1.91 KB, text/plain)
2021-03-17 20:01 UTC, Ben Beasley
no flags Details
File: environ (5.42 KB, text/plain)
2021-03-17 20:01 UTC, Ben Beasley
no flags Details
File: mountinfo (4.27 KB, text/plain)
2021-03-17 20:01 UTC, Ben Beasley
no flags Details
File: namespaces (172 bytes, text/plain)
2021-03-17 20:01 UTC, Ben Beasley
no flags Details
File: open_fds (337 bytes, text/plain)
2021-03-17 20:01 UTC, Ben Beasley
no flags Details

Description Ben Beasley 2021-03-17 20:01:35 UTC
Description of problem:
Used rpmlint (via “fedpkg lint”) on the “agenda” package, which has localized summaries and descriptions.

Manually installing the hunspell dictionary (dnf install hunspell-ca) gets the exception to refer to the next language (de instead of ca), and I can do this for most of the languages in the spec file:

sudo dnf install hunspell-{ca,de,es,fr,gl,it,ja,ko,lt,ms,pl,pt,ru,sr,ur}

But some languages used in the spec file are not available (ja,ka,tr,zh), so I still get the exception no matter what I do.

In any case, it seems like rpmlint should not bail with an unhandled exception when it encounters a language for which enchant has no dictionary.

Version-Release number of selected component:
rpmlint-1.11-15.fc33

Additional info:
reporter:       libreport-2.14.0
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-19aaf4ec-5862-4ad4-b3c7-f4c46acd5467.scope
cmdline:        /usr/bin/python3 -ttOu /usr/bin/rpmlint /home/ben/fedora/mine/agenda/agenda.spec /home/ben/fedora/mine/agenda/agenda-1.1.0-8.fc35.src.rpm
crash_function: __init__
exception_type: enchant.errors.DefaultLanguageNotFoundError
executable:     /usr/bin/rpmlint
interpreter:    python3-3.9.2-1.fc33.x86_64
kernel:         5.10.19-200.fc33.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
__init__.py:140:__init__:enchant.errors.DefaultLanguageNotFoundError: ca

Traceback (most recent call last):
  File "/usr/bin/rpmlint", line 379, in <module>
    main()
  File "/usr/bin/rpmlint", line 169, in main
    runChecks(pkg)
  File "/usr/bin/rpmlint", line 227, in runChecks
    check.check(pkg)
  File "/usr/share/rpmlint/TagsCheck.py", line 699, in check
    self.check_summary(pkg, lang, ignored_words)
  File "/usr/share/rpmlint/TagsCheck.py", line 920, in check_summary
    spell_check(pkg, summary, 'Summary(%s)', lang, ignored_words)
  File "/usr/share/rpmlint/TagsCheck.py", line 462, in spell_check
    checker = enchant.checker.SpellChecker(
  File "/usr/lib/python3.9/site-packages/enchant/checker/__init__.py", line 140, in __init__
    raise DefaultLanguageNotFoundError(lang) from None
enchant.errors.DefaultLanguageNotFoundError: ca

Local variables in innermost frame:
self: <enchant.checker.SpellChecker object at 0x7f678c9bed30>
lang: 'ca'
text: None
tokenize: None
chunkers: None
filters: [<class 'enchant.tokenize.EmailFilter'>, <class 'enchant.tokenize.URLFilter'>, <class 'enchant.tokenize.WikiWordFilter'>]

Comment 1 Ben Beasley 2021-03-17 20:01:39 UTC
Created attachment 1764172 [details]
File: backtrace

Comment 2 Ben Beasley 2021-03-17 20:01:40 UTC
Created attachment 1764173 [details]
File: cpuinfo

Comment 3 Ben Beasley 2021-03-17 20:01:41 UTC
Created attachment 1764174 [details]
File: environ

Comment 4 Ben Beasley 2021-03-17 20:01:43 UTC
Created attachment 1764175 [details]
File: mountinfo

Comment 5 Ben Beasley 2021-03-17 20:01:44 UTC
Created attachment 1764176 [details]
File: namespaces

Comment 6 Ben Beasley 2021-03-17 20:01:46 UTC
Created attachment 1764177 [details]
File: open_fds

Comment 7 Ben Beasley 2021-03-17 20:02:57 UTC

*** This bug has been marked as a duplicate of bug 1904399 ***


Note You need to log in before you can comment on or make changes to this bug.