Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot call method 'indexOf' of undefined #11

Open
jpsilvashy opened this issue Feb 10, 2015 · 2 comments
Open

TypeError: Cannot call method 'indexOf' of undefined #11

jpsilvashy opened this issue Feb 10, 2015 · 2 comments

Comments

@jpsilvashy
Copy link

I'm not too savvy with node, after all my trips are downloaded, it starts processing them, at some point in the process I get:

TypeError: Cannot call method 'indexOf' of undefined
    at Object.<anonymous> (/Users/jpsilvashy/Projects/hack/uber-trip-script/app.js:212:15)
    at exports.each (/Users/jpsilvashy/Projects/hack/uber-trip-script/node_modules/cheerio/lib/api/traversing.js:268:24)
    at parseStats (/Users/jpsilvashy/Projects/hack/uber-trip-script/app.js:177:27)
    at Request._callback (/Users/jpsilvashy/Projects/hack/uber-trip-script/app.js:141:12)
    at Request.self.callback (/Users/jpsilvashy/Projects/hack/uber-trip-script/node_modules/request/request.js:344:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/Users/jpsilvashy/Projects/hack/uber-trip-script/node_modules/request/request.js:1239:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/Users/jpsilvashy/Projects/hack/uber-trip-script/node_modules/request/request.js:1187:12)
    at IncomingMessage.emit (events.js:117:20)

I have a lot of trips, 64 pages of them, maybe that is too many?

@chriswhong
Copy link
Owner

Yeah try to take it down to 9 and see if it works.

@chriswhong
Copy link
Owner

Maybe this fixes your error? #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants