feed2imap / ruby-feedparser

Ruby library to parse ATOM/RSS feeds
http://home.gna.org/ruby-feedparser/
Other
17 stars 8 forks source link

Exception caught while uploading mail .... uninitialized constant Magic::Exception #4

Closed shakeyourbunny closed 8 years ago

shakeyourbunny commented 9 years ago

feed2imap crashes in its feedparser with the following dump:

feed2imap -v -v -v -v -v I, [2015-07-11T10:10:41.980667 #10669] INFO -- : Feed2Imap V.1.2.5 started I, [2015-07-11T10:10:41.980777 #10669] INFO -- : Reading configuration file ... I, [2015-07-11T10:10:41.981962 #10669] INFO -- : Initializing cache ... W, [2015-07-11T10:10:41.982179 #10669] WARN -- : Cache file /home/pulaski/.feed2imap.cache not found, using a new one I, [2015-07-11T10:10:41.982210 #10669] INFO -- : Connecting to IMAP accounts ... I, [2015-07-11T10:10:41.982234 #10669] INFO -- : Fetching and filtering feeds ... I, [2015-07-11T10:10:42.081003 #10669] INFO -- : Parsing and uploading ... I, [2015-07-11T10:10:42.303669 #10669] INFO -- : nirsoft-blog: 10 new items, 0 updated items. F, [2015-07-11T10:10:42.310473 #10669] FATAL -- : Exception caught while uploading mail to /home/pulaski/Maildir: uninitialized constant Magic::Exception /usr/lib/ruby/site_ruby/1.9.1/feedparser/feedparser.rb:21:in rescue in recode' /usr/lib/ruby/site_ruby/1.9.1/feedparser/feedparser.rb:19:inrecode' /usr/lib/ruby/site_ruby/1.9.1/feedparser/html2text-parser.rb:32:in handle_data' /usr/lib/ruby/site_ruby/1.9.1/feedparser/sgml-parser.rb:78:ingoahead' /usr/lib/ruby/site_ruby/1.9.1/feedparser/sgml-parser.rb:58:in feed' /usr/lib/ruby/site_ruby/1.9.1/feedparser/text-output.rb:10:inhtml2text' /usr/lib/ruby/site_ruby/1.9.1/feedparser/text-output.rb:75:in to_text' /usr/lib/ruby/site_ruby/1.9.1/feed2imap/itemtomail.rb:86:initem_to_mail' /usr/lib/ruby/site_ruby/1.9.1/feed2imap/feed2imap.rb:260:in block (2 levels) in initialize' /usr/lib/ruby/site_ruby/1.9.1/feed2imap/feed2imap.rb:258:ineach' /usr/lib/ruby/site_ruby/1.9.1/feed2imap/feed2imap.rb:258:in block in initialize' /usr/lib/ruby/site_ruby/1.9.1/feed2imap/feed2imap.rb:223:ineach' /usr/lib/ruby/site_ruby/1.9.1/feed2imap/feed2imap.rb:223:in initialize' /usr/bin/feed2imap:48:innew' /usr/bin/feed2imap:48:in `

'

feed configuration:

Feed2Imap v.1.2.5 (current git) ruby 1.9.3p484 (2013-11-22 revision 43786) [i486-linux](current ruby 1.9.8 also wont work)

gem list --local

* LOCAL GEMS *

bigdecimal (1.1.0) ffi (1.9.10) io-console (0.3) json (1.5.5) magic (0.2.9) minitest (2.5.1) rake (0.9.2.2) rdoc (3.9.5) rmail (1.1.0)

System packages:

  • file 5.14
  • libyaml 0.1.6

OS ist Salix OS (slackware 14.1) Linux salixos 3.10.17-smp #2 SMP Wed Oct 23 17:13:14 CDT 2013 i686 Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz GenuineIntel GNU/Linux

In addition, feed2imap eats up the whole system memory (swap included) after processing 4-6 feeds.

shakeyourbunny commented 9 years ago

Updating the gems still did not help: gem list --local

* LOCAL GEMS *

bigdecimal (1.2.7, 1.1.0) ffi (1.9.10) io-console (0.4.2, 0.3) json (1.8.3, 1.5.5) magic (0.2.9) minitest (5.7.0, 2.5.1) rake (10.4.2, 0.9.2.2) rdoc (4.2.0, 3.9.5) rmail (1.1.0)

shakeyourbunny commented 9 years ago

Well, the deeper underlying issue is that the magic gem has some serious problems if file/ilbmagic is not version 5.22, dunno why.

In my case, the feedparser cannot cope with version 5.11-21.el7 (CentOS 7) and not with Slackware-current (5.24).

please fix.

terceiro commented 8 years ago

fixed by 496863a8f7b598b6012fc72488b63327547d0cfb