manolomartinez / greg

A command-line podcast aggregator
GNU General Public License v3.0
299 stars 37 forks source link

IndexError: list index out of range after "greg info" #93

Closed lochbika closed 5 years ago

lochbika commented 6 years ago

I get the following error when running greg info:

$ greg info
Traceback (most recent call last):
  File "/usr/bin/greg", line 11, in <module>
    load_entry_point('Greg==0.4.7', 'console_scripts', 'greg')()
  File "/usr/lib/python3.7/site-packages/greg/parser.py", line 138, in main
    function(vars(args))
  File "/usr/lib/python3.7/site-packages/greg/commands.py", line 130, in info
    aux.pretty_print(session, feed)
  File "/usr/lib/python3.7/site-packages/greg/aux_functions.py", line 262, in pretty_print
    entrylinks, linkdates = parse_feed_info(feed_info)
  File "/usr/lib/python3.7/site-packages/greg/aux_functions.py", line 246, in parse_feed_info
    linkdates.append(eval(line.split(sep=' ', maxsplit=1)[1]))
IndexError: list index out of range

I have the following versions of the dependencies: python-sgmllib-5.2.1-3
python-feedparser-5.2.1-3

I use the greg-git package from the AUR. But, the error also occurs when I install greg via pip.

Cheers

lochbika commented 5 years ago

I don't know why, but deleting the directory ~/.local/share/greg/data solved the issue.... This means that you have to re-add all podcasts and re-download all episodes to have them acknowledged by greg.

bcongdon commented 5 years ago

I ran into a similar issue and was able to fix it by checking the various feed files in ~/.local/share/greg/data. One of them had garbled junk at the end of the file. When I removed that, greg started working again