Closed haalasz closed 1 month ago
when importing via Import File
in UI, this example file produces 4 more records filled with None
[Edit:] fixed here
Also (i think) fixed datetime, just needed to be imported apparently.
empty cells are filled with None
how do we want it to behave instead?
empty cells are filled with None
how do we want it to behave instead?
If the cell is empty in the xlsx file, it must remain empty after import.
TODO: handling excel column name mismatch (not to import but error out) csv import works fine (name mismatch popup appears, select select deired column name) but xlsx crashes it out
After importing xlsx with wrong column name (not matching the .metagenomongo.csv) it gives this error message after clicking the popup to fix the wrong name (based on difflib):
/home/haalasz/anaconda3/lib/python3.11/site-packages/openpyxl/reader/excel.py:228: UserWarning: Data Validation extension is not supported and will be removed
ws_parser.bind_all()
Traceback (most recent call last):
File "/home/haalasz/github/metagenom/MetagenoMongo/metagenomongo.py", line 267, in <module>
if cell_value.strip():
^^^^^^^^^^^^^^^^
AttributeError: 'datetime.datetime' object has no attribute 'strip'
TODO: see if i can find a good existing xlsx to csv tool that can be imported to execute before excel import [SOLVED]: made pandas handle all file importing and exporting
TODO EXTRA: popup to veriyf/select table from excel file [CLUE:] pandas lets you specify sheet on xlsx import
If the cell is empty in the xlsx file, it must remain empty after import.
added conversion for this on each place it imports file
I've just noticed that there's a draft pull request on this repo that is related to this issue. What is the status of that pull request? Is it something that should be merged into the main branch?
I've commented on the pull request that the excel import fix messed up the GUI. It is fixed now and the working app is called mtgnmng.py
to avoid the accidental merge. The xlsx fix branch should not be merged with the main.
Thank you, I have closed the pull request as rejected.
NoneType errors, datetime library is not imported, empty cells are filled with None.