javascriptdata / danfojs

Danfo.js is an open source, JavaScript library providing high performance, intuitive, and easy to use data structures for manipulating and processing structured data.
https://danfo.jsdata.org/
MIT License
4.81k stars 209 forks source link

No Error Thrown If File Path Is Invalid For df.readCSV? #456

Closed guekling closed 2 years ago

guekling commented 2 years ago

Describe the bug When an invalid filepath is passed into df.readCSV, no errors are thrown and the request is never resolved. Are we supposed to check for validity of filepath ourselves before passing it into the function?

To Reproduce Use the following code:

import * as dfd from "danfojs-node";

dfd.readCSV("invalid-filepath.csv")
  .then((df) => {
    // some code
  })
  .catch((error) => {
    console.log(error)
  })

Expected behavior Should throw an error.

Additional context Using danfojs-node v1.1.1

risenW commented 2 years ago

Fixed in https://github.com/javascriptdata/danfojs/pull/503

ghost commented 1 year ago

I encounter the same issue using "danfojs" v1.1.2 in Angular. Has this been fixed for node-only or browser as well?