Bug 799714 - [abrt] calibre-0.8.33-2.fc16: __init__.py:353:__init__:OSError: libunrar.so: cannot open shared object file: No such file or directory
Summary: [abrt] calibre-0.8.33-2.fc16: __init__.py:353:__init__:OSError: libunrar.so: ...
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: calibre
Version: 16
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:9292323ea026f2510b376fd4e94...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-04 14:49 UTC by Dario Meloni
Modified: 2012-03-04 19:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-04 15:04:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dario Meloni 2012-03-04 14:49:45 UTC
libreport version: 2.0.8
abrt_version:   2.0.7
cmdline:        python2 /usr/bin/calibre-parallel
comment:        Trying to convert a CBR on fedora 16
executable:     /usr/bin/calibre-parallel
kernel:         3.2.7-1.fc16.x86_64
reason:         __init__.py:353:__init__:OSError: libunrar.so: cannot open shared object file: No such file or directory
time:           Sun 04 Mar 2012 10:23:50 AM CET
uid:            1000
username:       dario

backtrace:
:__init__.py:353:__init__:OSError: libunrar.so: cannot open shared object file: No such file or directory
:
:Traceback (most recent call last):
:  File "/usr/bin/calibre-parallel", line 19, in <module>
:    sys.exit(main())
:  File "/usr/lib64/calibre/calibre/utils/ipc/worker.py", line 186, in main
:    result = func(*args, **kwargs)
:  File "/usr/lib64/calibre/calibre/gui2/convert/gui_conversion.py", line 31, in gui_convert_override
:    override_input_metadata=True)
:  File "/usr/lib64/calibre/calibre/gui2/convert/gui_conversion.py", line 25, in gui_convert
:    plumber.run()
:  File "/usr/lib64/calibre/calibre/ebooks/conversion/plumber.py", line 959, in run
:    accelerators, tdir)
:  File "/usr/lib64/calibre/calibre/customize/conversion.py", line 204, in __call__
:    log, accelerators)
:  File "/usr/lib64/calibre/calibre/ebooks/comic/input.py", line 438, in convert
:    pages = self.get_pages(fname, cdir)
:  File "/usr/lib64/calibre/calibre/ebooks/comic/input.py", line 387, in get_pages
:    tdir  = extract_comic(comic)
:  File "/usr/lib64/calibre/calibre/ebooks/comic/input.py", line 33, in extract_comic
:    extract(path_to_comic_file, tdir)
:  File "/usr/lib64/calibre/calibre/__init__.py", line 254, in extract
:    from calibre.libunrar import extract as rarextract
:  File "/usr/lib64/calibre/calibre/libunrar.py", line 34, in <module>
:    _libunrar = load_library(_librar_name, cdll)
:  File "/usr/lib64/calibre/calibre/__init__.py", line 239, in load_library
:    return cdll.LoadLibrary(name+'.so')
:  File "/usr/lib64/python2.7/ctypes/__init__.py", line 431, in LoadLibrary
:    return self._dlltype(name)
:  File "/usr/lib64/python2.7/ctypes/__init__.py", line 353, in __init__
:    self._handle = _dlopen(self._name, mode)
:OSError: libunrar.so: cannot open shared object file: No such file or directory
:
:Local variables in innermost frame:
:_FuncPtr: <class 'ctypes._FuncPtr'>
:handle: None
:name: 'libunrar.so'
:use_last_error: False

Comment 1 Kevin Fenzi 2012-03-04 15:04:25 UTC
unrar support is not provided in Fedora due to legal reasons. 

You can try installing unrar from rpmfusion...

Comment 2 Dario Meloni 2012-03-04 15:58:57 UTC
I was thinking of adding a try catch to report and error, instead of leaving the exception generate an abrt report.

--- /usr/lib64/calibre/calibre/libunrar.py.orig	2012-03-04 16:35:26.907478710 +0100
+++ /usr/lib64/calibre/calibre/libunrar.py	2012-03-04 16:57:02.419237450 +0100
@@ -32,7 +32,10 @@
     lp = os.path.join(sys.frozen_path, 'lib', 'libunrar.so')
     _libunrar = cdll.LoadLibrary(lp)
 else:
-    _libunrar = load_library(_librar_name, cdll)
+    try:
+        _libunrar = load_library(_librar_name, cdll)
+    except OSError:
+        sys.exit(1);
 
 RAR_OM_LIST    = 0
 RAR_OM_EXTRACT = 1

Comment 3 Kevin Fenzi 2012-03-04 19:36:19 UTC
Well, it's a bit of a moving target... upstream has no desire for this sort of patch (since they ship libunrar), and the refactor this code from time to time. ;(


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