Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 622728 - app-text/calibre-3.1.1: KeyError: "No plugin named '_regex'"
Summary: app-text/calibre-3.1.1: KeyError: "No plugin named '_regex'"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zac Medico
URL:
Whiteboard:
Keywords:
: 622762 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-06-26 09:43 UTC by octoploid
Modified: 2019-02-20 20:50 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
The patch (calibre-3.1.1-fix-regex-issue.patch,435 bytes, patch)
2017-06-26 20:13 UTC, jorgicio
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description octoploid 2017-06-26 09:43:20 UTC
app-text/calibre-3.1.1 has missing dependencies:
dev-python/msgpack & dev-python/regex

But even when both are installed I get the following error during startup:

Traceback (most recent call last):          
  File "/usr/lib64/calibre/calibre/gui2/ui.py", line 160, in __init__                    
    ac = self.init_iaction(action)          
  File "/usr/lib64/calibre/calibre/gui2/ui.py", line 174, in init_iaction                
    ac = action.load_actual_plugin(self)    
  File "/usr/lib64/calibre/calibre/customize/__init__.py", line 614, in load_actual_plugin                                                                                         
    ac = getattr(importlib.import_module(mod), cls)(gui,                                 
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module           
    __import__(name)                        
  File "/usr/lib64/calibre/calibre/gui2/actions/catalog.py", line 13, in <module>        
    from calibre.gui2.tools import generate_catalog                                      
  File "/usr/lib64/calibre/calibre/gui2/tools.py", line 16, in <module>                  
    from calibre.gui2.convert.single import NoSupportedInputFormats                      
  File "/usr/lib64/calibre/calibre/gui2/convert/single.py", line 20, in <module>         
    from calibre.gui2.convert.search_and_replace import SearchAndReplaceWidget           
  File "/usr/lib64/calibre/calibre/gui2/convert/search_and_replace.py", line 11, in <module>                                                                                       
    from calibre.gui2.convert.search_and_replace_ui import Ui_Form                       
  File "/usr/lib64/calibre/calibre/gui2/convert/search_and_replace_ui.py", line 155, in <module>                                                                                   
    from regex_builder import RegexEdit     
  File "/usr/lib64/calibre/calibre/gui2/convert/regex_builder.py", line 18, in <module>  
    from calibre.ebooks.conversion.search_replace import compile_regular_expression      
  File "/usr/lib64/calibre/calibre/ebooks/conversion/search_replace.py", line 7, in <module>                                                                                       
    import regex                            
  File "/usr/lib64/calibre/regex/__init__.py", line 383, in <module>                     
  File "/usr/lib64/calibre/regex/_regex_core.py", line 21, in <module>                   
  File "/usr/lib64/calibre/calibre/constants.py", line 207, in __getitem__               
    raise KeyError('No plugin named %r'%name)                                            
KeyError: "No plugin named '_regex'" 

Reproducible: Always
Comment 1 Leonard Lausen 2017-06-26 14:11:46 UTC
I can partially confirm this issue.

Without dev-python/regex the installation fails with an error that the module regex was not found. However after installing dev-python/regex from stable the installation succeeds.
Comment 2 Zac Medico gentoo-dev 2017-06-26 16:21:42 UTC
Thanks, this is fixed in 3.1.1-r1:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=300275bab99b69ac28dd1d27192e4984ae0050ff
Comment 4 octoploid 2017-06-26 16:59:00 UTC
It still errors out during startup (see original message)
 KeyError: "No plugin named '_regex'"
Comment 5 Zac Medico gentoo-dev 2017-06-26 17:09:23 UTC
What version of dev-python/regex do you have? I have 2017.04.05 and it works for me.
Comment 6 octoploid 2017-06-26 17:11:49 UTC
(In reply to Zac Medico from comment #5)
> What version of dev-python/regex do you have? I have 2017.04.05 and it works
> for me.

I've tried both 2016.01.10 and 2017.04.05. The error is the same.
Comment 7 Zac Medico gentoo-dev 2017-06-26 17:18:46 UTC
Did you rebuild calibre? I suspect that you need to rebuild with regex installed.
Comment 8 octoploid 2017-06-26 17:20:10 UTC
(In reply to Zac Medico from comment #7)
> Did you rebuild calibre? I suspect that you need to rebuild with regex
> installed.

Yes, but if I "rm -fr /usr/lib64/calibre/regex" calibre starts fine.
Comment 9 Zac Medico gentoo-dev 2017-06-26 20:11:39 UTC
*** Bug 622762 has been marked as a duplicate of this bug. ***
Comment 10 jorgicio 2017-06-26 20:13:11 UTC
Created attachment 478098 [details, diff]
The patch

This patch works for me. I created it.
Comment 11 Zac Medico gentoo-dev 2017-06-26 20:17:36 UTC
I guess this /usr/lib64/calibre/regex directory is a leftover from people using upstream's "Binary install" instructions:

https://calibre-ebook.com/download_linux

Removing it is the right thing to do. I guess I can make the ebuild do this in pkg_postinst.
Comment 12 Zac Medico gentoo-dev 2017-06-26 22:19:10 UTC
It should be fixed in 3.1.1-r2:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a16a17a3b8e8c9b137d093bdba652aea1e8fe77d