gvalkov / rsstail.py

A command-line syndication feed monitor
Other
47 stars 8 forks source link

Ubuntu 12.04 "Required argument 'year' (pos 1) not found" #3

Closed dghodgson closed 11 years ago

dghodgson commented 11 years ago

I keep getting this error whenever I run rsstail in a virtual Ubuntu 12.04 machine (both server and desktop editions give me this problem). I installed it with sudo ./setup.py install It works just fine on my desktop, but I've got a ton of extra packages installed from various things (software development, remote server administration, even installed some wiimote software which uses python. I'm also running Gnome 3 instead of Unity),

I've tried installing python-formatter and python-lxml (it was on my desktop, figured it couldn't hurt), but no dice. It'd be great if I could get some insight into what exactly is going wrong in the script so I could find the package I need and install it.

Executing rsstail with just a url to an RSS feed gives me this:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rsstail-0.2.0-py2.7.egg/rsstail/main.py", line 384, in main
    tick(feeds, o, formatter, iteration)
  File "/usr/local/lib/python2.7/dist-packages/rsstail-0.2.0-py2.7.egg/rsstail/main.py", line 331, in tick
    out = formatter(entry).encode('utf-8')
  File "/usr/local/lib/python2.7/dist-packages/rsstail-0.2.0-py2.7.egg/rsstail/formatter.py", line 70, in __call__
    return self.format(entry)
  File "/usr/local/lib/python2.7/dist-packages/rsstail-0.2.0-py2.7.egg/rsstail/formatter.py", line 83, in format
    rendered[i] = self.format_tt(rendered[i])
  File "/usr/local/lib/python2.7/dist-packages/rsstail-0.2.0-py2.7.egg/rsstail/formatter.py", line 97, in format_tt
    dt = datetime(*tt[:6])
TypeError: Required argument 'year' (pos 1) not found
dghodgson commented 11 years ago

Never mind, apparently I didn't reset the branch to v0.2.0 on my desktop, because grabbing the latest code from the repository seems to work. Not sure what broke where in v0.2.0, but the latest version of the code is working just fine.

gvalkov commented 11 years ago

No problem. The 'Required argument 'year'` issue (#1) was fixed recently. There is one other major issue (feeds without updated/created fields aren't handled properly) that I would like to fix before I release a new version to PyPi. One of these days ...

dghodgson commented 11 years ago

Would that have something to do with the error I'm receiving when using the --newer flag?

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/rsstail-0.2.0-py2.7.egg/rsstail/main.py", line 388, in main
    tick(feeds, o, formatter, iteration)
  File "/usr/local/lib/python2.7/dist-packages/rsstail-0.2.0-py2.7.egg/rsstail/main.py", line 322, in tick
    entries = list(filter(p, entries))
  File "/usr/local/lib/python2.7/dist-packages/rsstail-0.2.0-py2.7.egg/rsstail/main.py", line 321, in 
    p = lambda entry: entry.date_parsed > options.newer
  File "/usr/local/lib/python2.7/dist-packages/feedparser-5.1.3-py2.7.egg/feedparser.py", line 416, in __getattr__
    raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'date_parsed'

I get this error on my server, but not on my desktop. Even when I revert to this commit: 42b359b087f60a9a0b994a91b028e43704da3381 (the version installed on my desktop), I still get the error on my server.

gvalkov commented 11 years ago

Yes, exactly. You'll also notice that such feeds aren't properly updated when new items are posted.