Clinical-Genomics-Lund / bonsai

Visualize and analyze resistance and outbreak of bacterial pathogen
https://bonsai-wgs.readthedocs.io/en/latest/
4 stars 1 forks source link

Error when removing signature from database #156

Closed mhkc closed 6 months ago

mhkc commented 6 months ago

Describe the bug Removing a signature causes this error from minhasher

2024-03-19 14:53:59,669 [ERROR] rq.worker: [Job 137684eb-06cf-4c59-a627-ad52e65e2d38]: exception raised while executing (minhash_service.tasks.remove_signature)
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/rq/worker.py", line 1428, in perform_job
    rv = job.perform()
         ^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/rq/job.py", line 1278, in perform
    self._result = self._execute()
                   ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/rq/job.py", line 1315, in _execute
    result = self.func(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/worker/app/minhash_service/tasks.py", line 37, in remove_signature
    status: bool = remove_signature_file(sample_id)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/worker/app/minhash_service/minhash/io.py", line 134, in remove_signature
    tree.remove_many(leaf)
    ^^^^^^^^^^^^^^^^
AttributeError: 'SBT' object has no attribute 'remove_many'

To Reproduce Steps to reproduce the behavior:

  1. Remove a sample from bonsai gui
  2. Check minhasher logs