{"action":"created","issue":{"url":"https://api.github.com/repos/visionmedia/superagent/issues/766","repository_url":"https://api.github.com/repos/visionmedia/superagent","labels_url":"https://api.github.com/repos/visionmedia/superagent/issues/766/labels{/name}","comments_url":"https://api.github.com/repos/visionmedia/superagent/issues/766/comments","events_url":"https://api.github.com/repos/visionmedia/superagent/issues/766/events","html_url":"https://github.com/visionmedia/superagent/issues/766","id":110855033,"number":766,"title":"image buffer","user":{"login":"halfcrazy","id":4113173,"avatar_url":"https://avatars.githubusercontent.com/u/4113173?v=3","gravatar_id":"","url":"https://api.github.com/users/halfcrazy","html_url":"https://github.com/halfcrazy","followers_url":"https://api.github.com/users/halfcrazy/followers","following_url":"https://api.github.com/users/halfcrazy/following{/other_user}","gists_url":"https://api.github.com/users/halfcrazy/gists{/gist_id}","starred_url":"https://api.github.com/users/halfcrazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halfcrazy/subscriptions","organizations_url":"https://api.github.com/users/halfcrazy/orgs","repos_url":"https://api.github.com/users/halfcrazy/repos","events_url":"https://api.github.com/users/halfcrazy/events{/privacy}","received_events_url":"https://api.github.com/users/halfcrazy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2015-10-11T13:06:58Z","updated_at":"2016-12-13T22:55:26Z","closed_at":"2016-12-13T22:55:26Z","body":"As shown below, there's something wrong with the call to myOcr.ocr, but i've checked the param passed to the function call, i found it indeed a object with buffer type.\nmy node version is 4.1.2\nand superagent version is 1.2.0\n\n<Buffer ff d8 ff e0 00 10 4a 46 49 46 00 01 01 00 00 01 00 01 00 00 ff db 00 43 00 08 06 06 07 06 05 08 07 07 07 09 09 08 0a 0c 14 0d 0c 0b 0b 0c 19 12 13 0f ... >\n/root/workspace/city_fetcher/common/simulate_login.js:33\n        myOcr.ocr(res1.body, function(err2, result) {\n              ^\n\nTypeError: Argument 1 must be an object of type Buffer\n    at TypeError (native)\n    at /root/workspace/city_fetcher/common/simulate_login.js:33:15\n    at Request.callback (/root/workspace/city_fetcher/node_modules/superagent/lib/node/index.js:785:12)\n    at /root/workspace/city_fetcher/node_modules/superagent/lib/node/index.js:929:14\n    at IncomingMessage.<anonymous> (/root/workspace/city_fetcher/node_modules/superagent/lib/node/parsers/image.js:8:7)\n    at emitNone (events.js:72:20)\n    at IncomingMessage.emit (events.js:166:7)\n    at endReadableNT (_stream_readable.js:893:12)\n    at doNTCallback2 (node.js:430:9)\n    at process._tickCallback (node.js:344:17)\n\n'''\n      var req = request.get(validateImgUrl);\n      req.set('Cookie', Cookies);\n      req.end(function(err1, res1) {\n        if (err1) {\n          return callback(err1);\n        }\n        console.log(res1.body);\n        var myOcr = new tesseract.OcrEio();\n        myOcr.ocr(res1.body, function(err2, result) {\n          if (err2) {\n            return callback(err2);\n          } else {\n'''\n"},"comment":{"url":"https://api.github.com/repos/visionmedia/superagent/issues/comments/266888562","html_url":"https://github.com/visionmedia/superagent/issues/766#issuecomment-266888562","issue_url":"https://api.github.com/repos/visionmedia/superagent/issues/766","id":266888562,"user":{"login":"pornel","id":72159,"avatar_url":"https://avatars.githubusercontent.com/u/72159?v=3","gravatar_id":"","url":"https://api.github.com/users/pornel","html_url":"https://github.com/pornel","followers_url":"https://api.github.com/users/pornel/followers","following_url":"https://api.github.com/users/pornel/following{/other_user}","gists_url":"https://api.github.com/users/pornel/gists{/gist_id}","starred_url":"https://api.github.com/users/pornel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pornel/subscriptions","organizations_url":"https://api.github.com/users/pornel/orgs","repos_url":"https://api.github.com/users/pornel/repos","events_url":"https://api.github.com/users/pornel/events{/privacy}","received_events_url":"https://api.github.com/users/pornel/received_events","type":"User","site_admin":false},"created_at":"2016-12-13T22:55:26Z","updated_at":"2016-12-13T22:55:26Z","body":"Sorry, that's an old issue. From the log I don't see a problem, and I don't know about OcrEio API."}}
{"actor":{"display_login":"pornel"}}