Plastic-Scanner / PSplot

A lightweight tool for obtaining and visualising the discrete near-infrared (NIR) data using the Plastic Scanner
GNU General Public License v3.0
7 stars 5 forks source link

[refactoring] improve software cohesion #24

Closed JoostScheffer closed 1 year ago

JoostScheffer commented 1 year ago

please let me know if you have bugs, suggestions, or requests :rocket:

Jerzeek commented 1 year ago

Had to revert this merge because apparently, it broke the Import Dataset.. Easy to replicate, and should not be too difficult to fix, I think. This is the error output:

Traceback (most recent call last): File "c:\Users\Jerry\Downloads\PSplot-32c565a3c20ff78143671cee86c4f60820b75d2a\PSplot-32c565a3c20ff78143671cee86c4f60820b75d2a\psplot.py", line 508, in load_dataset_online self.load_dataset(settings.DATAFRAME.DATASET_URL) File "c:\Users\Jerry\Downloads\PSplot-32c565a3c20ff78143671cee86c4f60820b75d2a\PSplot-32c565a3c20ff78143671cee86c4f60820b75d2a\psplot.py", line 551, in load_dataset return _read(filepath_or_buffer, kwds) File "C:\Users\Jerry\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\parsers\readers.py", line 605, in _read parser = TextFileReader(filepath_or_buffer, **kwds) File "C:\Users\Jerry\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\parsers\readers.py", line 1442, in __init__ self._engine = self._make_engine(f, self.engine) File "C:\Users\Jerry\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\parsers\readers.py", line 1753, in _make_engine return mapping[engine](f, **self.options) File "C:\Users\Jerry\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 78, in __init__ kwds["dtype"] = ensure_dtype_objs(kwds.get("dtype", None)) File "C:\Users\Jerry\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 433, in ensure_dtype_objs return pandas_dtype(dtype) File "C:\Users\Jerry\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\dtypes\common.py", line 1781, in pandas_dtype npdtype = np.dtype(dtype) TypeError: Field elements must be 2- or 3-tuples, got ''Name'' PS C:\Users\Jerry\Nextcloud\Projects\Plastic Sense PT2\PSplot>