Skip to content

Libgen not initializing when opening store - LibgenStore object has no attribute 'libgen' #5

Closed
@safurrier

Description

With CalibreLibgenStore 0.4 and Using Calibre 5 running on Docker linux container and also on OSX I get this error when trying to search Libgen.

I get this when navigating Get Books -> Stores -> Libgen Fiction
Previously this has worked by opening up Libgen in an external browser window but now this error results:

Linux:

calibre, version 5.3.0
ERROR: Unhandled exception: <b>AttributeError</b>:'LibgenStore' object has no attribute 'libgen'

calibre 5.3  embedded-python: True is64bit: True
Linux-4.4.59+-x86_64-with-glibc2.2.5 Linux ('64bit', '')
('Linux', '4.4.59+', '#25426 SMP PREEMPT Wed Jul 8 03:21:27 CST 2020')
Python 3.8.5
Interface language: None
Successfully initialized third party plugins: Libgen Fiction (0, 4, 0)
Traceback (most recent call last):
  File "calibre/gui2/actions/store.py", line 131, in open_store
  File "calibre_plugins.libgen_fiction.__init__", line 80, in open
    else self.libgen.base_url
AttributeError: 'LibgenStore' object has no attribute 'libgen'

OSX:

calibre, version 5.7.2
ERROR: Unhandled exception: <b>AttributeError</b>:'LibgenStore' object has no attribute 'libgen'

calibre 5.7.2  embedded-python: True is64bit: True
macOS-10.15.6-x86_64-i386-64bit Darwin ('64bit', '')
('Darwin', '19.6.0', 'Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64')
Python 3.8.5
OSX: ('10.15.6', ('', '', ''), 'x86_64')
Interface language: None
Successfully initialized third party plugins: Libgen Fiction (0, 4, 0)
Traceback (most recent call last):
  File "calibre/gui2/actions/store.py", line 131, in open_store
  File "calibre_plugins.libgen_fiction.__init__", line 80, in open
    else self.libgen.base_url
AttributeError: 'LibgenStore' object has no attribute 'libgen'

It looks like it's trying to open the browser before initializing the LibgenFiction object attached by calling the genesis() method. Adding a attribute check before opening the url fixes this (for me at least)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions