wustho / epy

CLI Ebook (epub2, epub3, fb2, mobi) Reader
GNU General Public License v3.0
971 stars 53 forks source link

error: do not load epub file #5

Closed buribu closed 4 years ago

buribu commented 4 years ago

Python 3.8.2
pip 20.0.2

epy "anyfile.epy"

Traceback (most recent call last): File "/data/data/com.termux/files/usr/bin/epy", line 11, in load_entry_point('epy==2020.3.8', 'console_scripts', 'epy')() File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/epy.py", line 1213, in main loadstate() File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/epy.py", line 523, in loadstate STATE = json.load(f) File "/data/data/com.termux/files/usr/lib/python3.8/json/init.py", line 293, in load return loads(fp.read(), File "/data/data/com.termux/files/usr/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/data/data/com.termux/files/usr/lib/python3.8/json/decoder.py", line 340, in decode raise JSONDecodeError("Extra data", s, end) json.decoder.JSONDecodeError: Extra data: line 12 column 9 (char 435)

wustho commented 4 years ago

Hey there, how long have you been using epy? Did you just update recently?

buribu commented 4 years ago

I used fbless. https://github.com/ashinkarov/fbless But this module has two drawbacks ...

  1. This module was written for python 2
  2. This module is an ebook reader for the fb2 format. I had to convert my ebooks. And keep two versions of python installed.

Yes, the problem happened in the current version of epy. I'm using epr or epy to simplify things ... epr is working now.

wustho commented 4 years ago

Hey there, seems like I did some patching without thinking about backward compatibility, since I thought a lot more people using epr than epy...

Can you delete recursively directory ~/.config/epy... And try epy epubfile.epuband see if the problem still persists?

buribu commented 4 years ago

Ok. Now it's working. Thanks.