microsoft / showwhy

MIT License
200 stars 28 forks source link

Unable to open simple CSV file #422

Closed priamai closed 11 months ago

priamai commented 11 months ago

Hi there, just installed the docker vanilla setup. I attempt to load a simple tab file and I am getting a lot of red in the browser console.

image

Error dump:

Uncaught TypeError: value.split is not a function
    at parseArray (parseTypes.js:93:1)
    at Array.map (<anonymous>)
    at generateCodebook.js:26:1
    at Array.forEach (<anonymous>)
    at generateCodebook (generateCodebook.js:17:1)
    at Object.onClick (ImportTable.js:35:1)
    at BaseButton._this._onClick (BaseButton.js:195:1)
    at HTMLUnknownElement.callCallback (react-dom.development.js:4164:1)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:1)
    at invokeGuardedCallback (react-dom.development.js:4277:1)
    at invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:4291:1)
    at executeDispatch (react-dom.development.js:9041:1)
    at processDispatchQueueItemsInOrder (react-dom.development.js:9073:1)
    at processDispatchQueue (react-dom.development.js:9086:1)
    at dispatchEventsForPlugins (react-dom.development.js:9097:1)
    at react-dom.development.js:9288:1
    at batchedUpdates$1 (react-dom.development.js:26140:1)
    at batchedUpdates (react-dom.development.js:3991:1)
    at dispatchEventForPluginEventSystem (react-dom.development.js:9287:1)
    at 
priamai commented 11 months ago

The TypeError: split is not a function occurs if we call a split() method on the value that is not of a type string. We can resolve the issue by converting the value into string before calling the split() method or by performing a type check; we can mitigate this error.

priamai commented 11 months ago

Closing this for now I believe is a peculiarity of my csv with array types.