Skip to content

FragHub crashes #11

@meier-rene

Description

@meier-rene

Hi,
we want to use FragHub to merge public and internal reference libraries into one big library. We did that in the past and and it worked and we would like to continue with using FragHub. Unfortunately, this time I get an crash. I dont use a prepared installation package but instead run FragHub from the command line in linux with python -m scripts.FragHub.

Please note: your requirements.txt is missing package numba. Without it it will not run.

I prepared a minimal example file and attached this. Github does only allow certain file types and I had to zip it.

When I execute FragHub, select 2.msp as input, an empty output folder, deselect all filter and start I get:

python -m scripts.FragHub
Erreur pendant l'exécution de MAIN dans le thread:
Traceback (most recent call last):
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/series.py", line 1090, in __setitem__
    self._set_with_engine(key, value)
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/series.py", line 1143, in _set_with_engine
    self._mgr.setitem_inplace(loc, value)
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/internals/managers.py", line 2209, in setitem_inplace
    arr[indexer] = value
    ~~~^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/arrays/string_.py", line 863, in __setitem__
    value = self._maybe_convert_setitem_value(value)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/arrays/string_.py", line 837, in _maybe_convert_setitem_value
    raise TypeError(
TypeError: Invalid value '570.334524572' for dtype 'str'. Value should be a string or missing value, got 'float' instead.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/rmeier/GIT/FragHub/scripts/main_worker.py", line 27, in run_main_in_worker
    main_function(
  File "/home/rmeier/GIT/FragHub/scripts/MAIN.py", line 207, in MAIN
    spectrum_list = mols_derivation_and_calculation(spectrum_list, output_directory,
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/scripts/normalizer/mols_calculation.py", line 154, in mols_derivation_and_calculation
    CONCATENATE_DF = CONCATENATE_DF.apply(apply_row_mapping, axis=1)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/frame.py", line 12419, in apply
    return op.apply().__finalize__(self, method="apply")
           ^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/apply.py", line 1015, in apply
    return self.apply_standard()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/apply.py", line 1167, in apply_standard
    results, res_index = self.apply_series_generator()
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/apply.py", line 1183, in apply_series_generator
    results[i] = self.func(v, *self.args, **self.kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/scripts/normalizer/mols_calculation.py", line 152, in apply_row_mapping
    return map_transformations(row, unique_transforms)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/scripts/normalizer/mols_calculation.py", line 82, in map_transformations
    row[key] = value
    ~~~^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/series.py", line 1100, in __setitem__
    self._set_values(indexer, value)
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/series.py", line 1168, in _set_values
    self._mgr = self._mgr.setitem(indexer=key, value=value)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/internals/managers.py", line 604, in setitem
    return self.apply("setitem", indexer=indexer, value=value)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/internals/managers.py", line 442, in apply
    applied = getattr(b, f)(**kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/internals/blocks.py", line 1667, in setitem
    values[indexer] = value
    ~~~~~~^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/arrays/string_.py", line 863, in __setitem__
    value = self._maybe_convert_setitem_value(value)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/rmeier/GIT/FragHub/.venv/lib/python3.12/site-packages/pandas/core/arrays/string_.py", line 837, in _maybe_convert_setitem_value
    raise TypeError(
TypeError: Invalid value '570.334524572' for dtype 'str'. Value should be a string or missing value, got 'float' instead.

2.msp.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions