greenelab / crossref

Download metadata for all DOIs using the Crossref API
https://doi.org/b48h
Creative Commons Zero v1.0 Universal
59 stars 10 forks source link

Invalid character error when using mongoimport #12

Open alberto-martin opened 5 years ago

alberto-martin commented 5 years ago

Hello, I was looking for ways to get a complete dump of the metadata in CrossRef and came across this useful project.

I've tried importing your dump file as well as the one archived by Bryan Newbold, but I've come across the following error:

After running this command to import the file (using Windows 10 Pro):

mongoimport --db crossref-mongo --collection works --file "C:\path\to\file\crossrefworks.json.xz"

I get the error:

Failed: error processing document #1: invalid character 'ý' looking for beginning of value imported 0 documents

I get the same error when I try importing Bryan Newbold's dump file.

It's the first time I'm using MongoDB so I don't know if I'm doing something wrong. I realise this is not strictly an error with the code in this project, but I thought you might be able to know what's going on with these dump files. Any help would be much appreciated.

alberto-martin commented 5 years ago

Nevermind, it was the silly mistake of not decompressing the file before importing... it seems that it is being imported correctly now

vinoddevlab commented 3 years ago

Nevermind, it was the silly mistake of not decompressing the file before importing... it seems that it is being imported correctly now

HI Albert, Can I have the total command please? as I am experiencing the similar issue while importing csv file. Failed: error processing document #1: invalid character 'm' in literal NaN (expecting 'N').