wincowgerDEV / OpenSpecy-package

Analyze, Process, Identify, and Share, Raman and (FT)IR Spectra
http://wincowger.com/OpenSpecy-package/
Creative Commons Attribution 4.0 International
23 stars 11 forks source link

Another strange CSV format, we should add a more informative error message #81

Closed wincowgerDEV closed 3 years ago

wincowgerDEV commented 3 years ago

I received this CSV format that will not read in Open Specy and returns an uninformative error "An error has occurred. Check your logs or contact the app author for clarification". I think we should make the error handling for csv files give something informative like "CSV file is incorrectly formatted, please ensure that your CSV file is formatted exactly the same as the test file." I am labeling this as a bug because it is a recurring issue that people who upload incorrectly formatted csv files end up contacting me about.

Wavelength;Intensity    
649 8934;93 2791
650 8576;93 3083
651 8218;93 218
652 7861;92 997
653 7503;92 6856
654 7145;92 3564
655 6788;92 819
656 643;91 9002
657 6072;91 7954
658 5715;91 7053
659 5357;91 5565
660 4999;91 3125
wincowgerDEV commented 3 years ago

Logs when the dataset is uploaded.

2021-05-18T18:12:59.773191+00:00 shinyapps[2419654]: Warning: Error in -: non-numeric argument to binary operator 2021-05-18T18:12:59.779767+00:00 shinyapps[2419654]: 141: make_rel 2021-05-18T18:12:59.779769+00:00 shinyapps[2419654]: 140: adj_intens.default 2021-05-18T18:12:59.779770+00:00 shinyapps[2419654]: 137: adj_intens.data.frame 2021-05-18T18:12:59.779771+00:00 shinyapps[2419654]: 135: [/srv/connect/apps/OpenSpecy/server.R#196] 2021-05-18T18:12:59.779771+00:00 shinyapps[2419654]: 119: data 2021-05-18T18:12:59.779772+00:00 shinyapps[2419654]: 112: renderPlotly [/srv/connect/apps/OpenSpecy/server.R#230] 2021-05-18T18:12:59.779773+00:00 shinyapps[2419654]: 111: func 2021-05-18T18:12:59.779773+00:00 shinyapps[2419654]: 108: shinyRenderWidget 2021-05-18T18:12:59.779774+00:00 shinyapps[2419654]: 94: renderFunc 2021-05-18T18:12:59.779774+00:00 shinyapps[2419654]: 107: func 2021-05-18T18:12:59.779797+00:00 shinyapps[2419654]: 13: runApp 2021-05-18T18:12:59.779774+00:00 shinyapps[2419654]: 93: output$MyPlot 2021-05-18T18:12:59.779798+00:00 shinyapps[2419654]: 12: fn 2021-05-18T18:12:59.779799+00:00 shinyapps[2419654]: 7: connect$retry 2021-05-18T18:12:59.779800+00:00 shinyapps[2419654]: 6: eval 2021-05-18T18:12:59.779800+00:00 shinyapps[2419654]: 5: eval

zsteinmetz commented 3 years ago

I agree! Though we should not support each and every of those strange .csv styles, informative error handling is the least we can do!