papa-parse-meteor icon indicating copy to clipboard operation
papa-parse-meteor copied to clipboard

Parsing remote files with `download: true` always fails, attempts to parse the URL itself

Open mtchllbrrn opened this issue 9 years ago • 5 comments

Sample code:

Papa.parse('http://samplecsvs.s3.amazonaws.com/SalesJan2009.csv', {
  download: true,
  complete: function(results) {
    console.log(results);
  }
})

Returns:

{ data: [ [ 'http://samplecsvs.s3.amazonaws.com/SalesJan2009.csv' ] ],
  errors:
   [ { type: 'Delimiter',
       code: 'UndetectableDelimiter',
       message: 'Unable to auto-detect delimiting character; defaulted to \',\'',
       row: undefined } ],
  meta:
   { delimiter: ',',
     linebreak: '\n',
     aborted: false,
     truncated: false } }

mtchllbrrn avatar Nov 18 '15 18:11 mtchllbrrn

I'm getting the same error. Were you able to find a solution?

bewallyt avatar Mar 10 '16 08:03 bewallyt

Unfortunately not. My needs changed shortly after I stumbled upon this bug, which obviated the need to come up with a solution.

mtchllbrrn avatar Mar 10 '16 18:03 mtchllbrrn

looks like it works good on client side, but does what you describe on server side

rozklad avatar Apr 19 '16 13:04 rozklad

I keep running into this myself. Have tried both calling a file from S3 and a local file, but either option just returns:

Parsing complete:
{ data: [],
  errors: 
    [ { type: 'Delimiter',
        code: 'UndetectableDelimiter',
        message: 'Unable to auto-detect delimiting character; defaulted to \',\'',
        row: undefined } ],
   meta: 
    { delimiter: ',',
      linebreak: '\n',
      aborted: false,
      truncated: false,
      fields: [ 'http://s3.amazonaws.com/bucket/file_name.csv' ] } }

allenfuller avatar Dec 29 '16 21:12 allenfuller

Added this note to the ReadME but wanted to post here in case anyone is subscribed to this thread:

Note: This package is no longer necessary: Note: If you are using a recent version of Meteor or imports, you no longer need this package. You can install the papaparse npm package directly and import it. In the root of your meteor project run meteor npm install --save papaparse. Then, you can import with import Papa from 'papaparse'; or import * as Papa from 'papaparse';

This problem is likely solved by switching to the npm version of the package OR is a problem in the npm version of the package and is thus out of scope for this repo

harrisonhunter avatar Dec 20 '18 03:12 harrisonhunter