ContentMine / getpapers

Get metadata, fulltexts or fulltext URLs of papers matching a search query
MIT License
197 stars 37 forks source link

V 0.4.4 crashes on writing results #98

Closed petermr closed 8 years ago

petermr commented 8 years ago
dynamic-0-4:junk1 pm286$ getpapers --version
0.4.4
dynamic-0-4:junk1 pm286$ getpapers --query nanotoxicity --minedterms --outdir nano
info: Searching using eupmc API
info: Found 319 open access results
Retrieving results [==============================] 100% (eta 0.0s)
info: Done collecting results
info: Saving result metadata
info: Full EUPMC result metadata written to eupmc_results.json

Error: ENOENT, no such file or directory 'PMC4735790/eupmc_result.json'
    at Object.fs.openSync (fs.js:439:18)
    at Object.fs.writeFileSync (fs.js:978:15)
    at EuPmc.writeRecord (/Users/pm286/.nvm/v0.10.38/lib/node_modules/getpapers/lib/eupmc.js:556:6)
    at /Users/pm286/.nvm/v0.10.38/lib/node_modules/getpapers/lib/eupmc.js:169:11
    at Array.forEach (native)
    at EuPmc.handleSearchResults (/Users/pm286/.nvm/v0.10.38/lib/node_modules/getpapers/lib/eupmc.js:168:20)
    at EuPmc.completeCallback (/Users/pm286/.nvm/v0.10.38/lib/node_modules/getpapers/lib/eupmc.js:113:11)
    at Request.emit (events.js:98:17)
    at Request.mixin._fireSuccess (/Users/pm286/.nvm/v0.10.38/lib/node_modules/getpapers/node_modules/restler/lib/restler.js:229:10)
    at /Users/pm286/.nvm/v0.10.38/lib/node_modules/getpapers/node_modules/restler/lib/restler.js:161:20
dynamic-0-4:junk1 pm286$ 

and

dynamic-0-4:junk1 pm286$ ls nano/
eupmc_results.json

Seems to be independent of the query

blahah commented 8 years ago

Silly bug, fixed in v0.4.5 https://github.com/ContentMine/getpapers/commit/cfaaccdbcba01ea52f0a83dbc4e48f6ca9128d6b