tk120404 / node-rssparser

🚀RSS/ATOM feed parser that returns the requested feed urls in a simple json object
http://www.laymansite.com
63 stars 20 forks source link

TypeError: First argument must be a string or Buffer #37

Closed cfjedimaster closed 6 years ago

cfjedimaster commented 6 years ago

My usage:

parser.parseURL('https://www.pinterest.com/evilgeniusno1/penny-for-your-thoughts.rss/', {}, function(err, out)  {

Full error:

{
  "code": 500,
  "error": "Script generated an unhandled asynchronous exception.",
  "details": "TypeError: First argument must be a string or Buffer",
  "name": "TypeError",
  "message": "First argument must be a string or Buffer",
  "stack": "TypeError: First argument must be a string or Buffer\n    at ServerResponse.end (_http_outgoing.js:739:13)\n    at /data/io/2f4c8022-44f3-4489-be0f-f29a74411702/webtask.js:26:9\n    at Parser.<anonymous> (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/lib/feed.js:80:17)\n    at emitOne (events.js:116:13)\n    at Parser.emit (events.js:211:7)\n    at SAXParser.onclosetag (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/xml2js/lib/parser.js:261:26)\n    at emit (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/sax/lib/sax.js:624:35)\n    at emitNode (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/sax/lib/sax.js:629:5)\n    at closeTag (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/sax/lib/sax.js:889:7)\n    at SAXParser.write (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/sax/lib/sax.js:1436:13)\n    at Parser.exports.Parser.Parser.parseString (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/xml2js/lib/parser.js:322:31)\n    at Parser.parseString (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/xml2js/lib/parser.js:5:59)\n    at parseString (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/lib/feed.js:88:16)\n    at Request._callback (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/lib/feed.js:47:25)\n    at Request.self.callback (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/request/request.js:186:22)\n    at emitTwo (events.js:126:13)\n    at Request.emit (events.js:214:7)\n    at Request.<anonymous> (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/request/request.js:1163:10)\n    at emitOne (events.js:116:13)\n    at Request.emit (events.js:211:7)\n    at IncomingMessage.<anonymous> (/data/_verquire/rssparser/0.0.11/node_modules/rssparser/node_modules/request/request.js:1085:12)\n    at Object.onceWrapper (events.js:313:30)"
}
cfjedimaster commented 6 years ago

Sorry - totally my fault.