nerdyator / feedjack

Automatically exported from code.google.com/p/feedjack
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

feedjack_update.py fails when feed contains long tag names #27

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Steps to reproduce:
1. add a feed that contains articles with tags longer than 50 characters (eg. 
http://www.digital-copyright.ca/node/feed )
2. run feedjack_update.py

Script fails with multiple python tracebacks, the important part being:

Traceback (most recent call last):
  File
"/usr/local/lib/python2.3/site-packages/Feedjack-0.9.12-py2.3.egg/EGG-INFO/scrip
ts/feedjack_update.py",
line 247, in process_feed
    process_entry(entry, fpf, feed, postdict, options)
  File
"/usr/local/lib/python2.3/site-packages/Feedjack-0.9.12-py2.3.egg/EGG-INFO/scrip
ts/feedjack_update.py",
line 116, in process_entry
    (link, title, guid, author, author_email, content, date_modified, fcat, \
  File
"/usr/local/lib/python2.3/site-packages/Feedjack-0.9.12-py2.3.egg/EGG-INFO/scrip
ts/feedjack_update.py",
line 105, in get_entry_data
    fcat = get_tags(entry)
  File
"/usr/local/lib/python2.3/site-packages/Feedjack-0.9.12-py2.3.egg/EGG-INFO/scrip
ts/feedjack_update.py",
line 67, in get_tags
    cobj.save()
  File
"/usr/local/lib/python2.3/site-packages/Feedjack-0.9.12-py2.3.egg/feedjack/model
s.py",
line 147, in save
    super(Tag, self).save()
  File "/usr/local/lib/python2.3/site-packages/django/db/models/base.py",
line 261, in save
    ','.join(placeholders)), db_values)
  File
"/usr/local/lib/python2.3/site-packages/django/db/backends/postgresql/base.py",
line 47, in execute
    return self.cursor.execute(smart_str(sql, self.charset),
self.format_params(params))
ProgrammingError: ERROR:  value too long for type character varying(50)

INSERT INTO "feedjack_tag" ("name") VALUES ('getting open source logic into
government (gosling)')

Original issue reported on code.google.com by ward...@gmail.com on 16 May 2008 at 3:28

GoogleCodeExporter commented 8 years ago
I'd also like to add that the url fields are 200 chars by default and that's 
also too
short for some feeds with long blog-titles in the URLs.
I've fixed it just by raising max_length limits, patch attached.

Original comment by mk.fraggod@gmail.com on 16 May 2010 at 6:26

Attachments: