Skip to content

gemconvert, read_gem, etc. crash with "no non-corrupt data files found" with good data #34

@ajakef

Description

@ajakef

Pandas 1.4 introduces a new behavior in read_csv where it raises an exception when the number of columns in the data is not equal to the length of the header input. This breaks the most important functions in gemlog. It will be fixed eventually. For now, gemlog 1.5.12 simply requires pandas < 1.4.

If you encounter this error, you can either 1) upgrade gemlog to 1.6.1 (which is fully compatible with the new pandas), 2) upgrade gemlog to 1.5.12 or higher (which automatically downgrades pandas to <1.4), or 3) manually downgrade pandas to < 1.4.

Example output below from this error:
2022-01-23 21:32:28,762 INFO Call: gemconvert
2022-01-23 21:32:28,765 INFO Beginning 210
2022-01-23 21:32:28,848 ERROR No non-corrupt raw files found in folder "raw"
Traceback (most recent call last):
File "/home/jake/anaconda3/envs/gem/lib/python3.9/site-packages/gemlog/gem2ms.py", line 39, in convert_single_SN
gemlog.convert(inputdir, SN = SN, convertedpath = outputdir, output_format = output_format, file_length_hour = output_length)
File "/home/jake/anaconda3/envs/gem/lib/python3.9/site-packages/gemlog/gemlog.py", line 213, in convert
raise MissingRawFiles(f'No non-corrupt raw files found in folder "{rawpath}"')
gemlog.gemlog.MissingRawFiles: No non-corrupt raw files found in folder "raw"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions