Failed: error processing document #1: invalid character '_' looking for beginning of value

190 Views Asked by At

I have been to trying to import a csv file in Mongo DB server using 'mongoimport' cmd. The error was "invalid character '_' looking for beginning of value ".

When I opened the csv file, invalid character '_' was at the beginning of the file, and when I tried to removed that and try to run the command again its showing the same error again with a new character as invalid, i.e the first letter of the file. What's the reason for error, is it the csv file or the command format, and how to solve it ..? This is the command I tried to run : " mongoimport --db mongo_practice --collection people --file people.csv"

I am using MongoDB Version 6.0 and running the command on windows powershell

Can anyone please clarify ??

0

There are 0 best solutions below