Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7292

mongoimport misleading error message

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.7, 2.2.0
    • Component/s: Tools

      Specially on Windows:

      When specifying a file to import with --file with a space (without double quotes),

      > mongoimport -d db -c coll --file D:\Parsely data\articles_split.json
      

      mongoimport will *not* display:

      Mon Oct  8 10:03:02 ERROR: file doesn't exist: filename.
      

      But

      ERROR: multiple occurrences
      
      Import CSV, TSV or JSON data into MongoDB.
      
      options:
      ...
      

      This is misleading because it seems it refers to multiple document occurrences.

      Same error occurs on Mac:

      > mongoimport -d test -c test --file test space.json
      ERROR: multiple occurrences
      

            Assignee:
            Unassigned Unassigned
            Reporter:
            gianfranco Gianfranco Palumbo
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: