wustho / epy

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

"AttributeError: 'NoneType' object has no attribute 'group'" when asking for help on the commandline #3

Closed jherazob closed 3 years ago

jherazob commented 4 years ago

FIle downloaded directly from the repo (since i have all the prerequisites installed), opened one epub without issues. Then tried this:

$ python3 epy.py -h
Traceback (most recent call last):
  File "epy.py", line 1279, in <module>
    main()
  File "epy.py", line 1183, in main
    hlp = re.search("(\n|.)*(?=\n\nKey)", hlp).group()
AttributeError: 'NoneType' object has no attribute 'group'

More strangely:

$ python3 epy.py --help
Usages:
    epy             read last epub
    epy EPUBFILE    read EPUBFILE
    epy STRINGS     read matched STRINGS from history
    epy NUMBER      read file from history
                    with associated NUMBER

Options:
    -r              print reading history
    -d              dump epub
    -h, --help      print short, long help

Short help breaks, log help gives short help.

Linux Mint 19.1, Python 3.6.9, in case it helps. I also installed epr so i imagine the short and long help are essentially the same, so it's not what you'd call "critical", but still :)

wustho commented 4 years ago

Ah totally missed this, will fix it next commit... Thanks