ContentMine / getpapers

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

Syntax error with getpapers minimal usage #187

Open mtdunstan opened 4 years ago

mtdunstan commented 4 years ago

I tried to follow the example of the previous issue, installation of getpapers with nvm seemed to work well (with the depreciated errors noted before).

Minimal example:

Matthews-MBP-5:getpapers matthew$ getpapers -q covid -o covid

gives

/Users/matthew/.nvm/v0.10.38/lib/node_modules/getpapers/lib/eupmc.js:43
    fs.readFile('eupmc_results.json', (err, data) => {
                                                   ^
SyntaxError: Unexpected token >
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/Users/matthew/.nvm/v0.10.38/lib/node_modules/getpapers/lib/api.js:1:75)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Is it an issue with my installation?

petermr commented 4 years ago

Hmmm....

I am not a Node/getpapers expert. Does this happen with any query? Sometimes queries give zero results and give a failure. Suggest you post to the group as I think Tim knows how to fix things.

On Tue, Jul 7, 2020 at 10:22 AM mtdunstan notifications@github.com wrote:

I tried to follow the example of the previous issue, installation of getpapers with nvm seemed to work well (with the depreciated errors noted before).

Minimal example:

Matthews-MBP-5:getpapers matthew$ getpapers -q covid -o covid

gives

/Users/matthew/.nvm/v0.10.38/lib/node_modules/getpapers/lib/eupmc.js:43 fs.readFile('eupmc_results.json', (err, data) => { ^ SyntaxError: Unexpected token > at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/Users/matthew/.nvm/v0.10.38/lib/node_modules/getpapers/lib/api.js:1:75) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)

Is it an issue with my installation?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ContentMine/getpapers/issues/187, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFTCSYJKFM7G74NYM5XA43R2LSNPANCNFSM4OSTYBUQ .

-- Peter Murray-Rust Founder ContentMine.org and Reader Emeritus in Molecular Informatics Dept. Of Chemistry, University of Cambridge, CB2 1EW, UK