PapaParse icon indicating copy to clipboard operation
PapaParse copied to clipboard

workers and webpack, SyntaxError: The URI is malformed.

Open greenpdx opened this issue 3 years ago • 1 comments

I have big data! I want to put it in a worker.

The URL that is blob maker is different than the fetch, there is a :1 on the end I do not know what the URL should look like.

      let cnt = 0
      this.recs = []
      console.log(src)
      PaPa.parse(src, { // https://github.com/CSSEGISandData/COVID-19/raw/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_deaths_US.csv
        preview: 0,
        download: true,
        header: false,
        worker: true,
        error: (err,_file) => { console.log('error', err) },
        complete: (rslt, _file) => {
          console.log('complete',cnt,this.recs)
        }, 
        step: (rslt, _prsr) => {
          if (!cnt++) {
            return    // skip first line
          }
      //console.log(rslt)
          const csv = rslt.data
          if (csv.length < 500) {
            console.log(csv)
            return
          }
          let rec = func(csv)
          this.recs.push( rec )
        }
      })

15:21:01.817 SyntaxError: The URI is malformed. 143dd881-acde-417f-8cc2-bdce53540c42:1 _readChunk blob:https://10.0.42.53:8080/143dd881-acde-417f-8cc2-bdce53540c42:1 _nextChunk blob:https://10.0.42.53:8080/143dd881-acde-417f-8cc2-bdce53540c42:1 stream blob:https://10.0.42.53:8080/143dd881-acde-417f-8cc2-bdce53540c42:1 parse blob:https://10.0.42.53:8080/143dd881-acde-417f-8cc2-bdce53540c42:1 onmessage blob:https://10.0.42.53:8080/143dd881-acde-417f-8cc2-bdce53540c42:1 (Async: EventHandlerNonNull) s blob:https://10.0.42.53:8080/143dd881-acde-417f-8cc2-bdce53540c42:1 blob:https://10.0.42.53:8080/143dd881-acde-417f-8cc2-bdce53540c42:1 15:21:01.906 GEThttps://10.0.42.53:8080/manifest.json [HTTP/1.1 200 OK 78ms

greenpdx avatar Sep 17 '21 23:09 greenpdx

Were you ever able to solve this problem? i am facing exactly the same issue which renders webWorkers unusuable for me :/

JodliDev avatar Nov 23 '21 09:11 JodliDev