LabTrivedi / MOrgAna

MIT License
24 stars 7 forks source link

Pipeline breaks #5

Open daniquebax opened 3 months ago

daniquebax commented 3 months ago

Hi,

I am trying to run morgana on a set of pictures. I am using masks that I created myself and inported into the program. However, when I try to run the program (e.g. calculate area) it always bugs on the same pictures. When I inspect these pictures I cannot find anything weird. Also in SplitObject the frame seems right and I don't see anything weird in result_segmentation mask or csv file. It gives me a very large "error" code. I am quite new to bioinformatics, so I tried some things but none are working. Is there anyone who can help me with this?

(morgana) PS C:\Users\dbax\OneDrive - Radboud Universiteit\Documenten\1. Protocols\morgana\MOrgAna> python -m morgana
### Computing morphology of images in: C:/Users/dbax/OneDrive - Radboud Universiteit/Documenten/2. Experiments/020_20231103 effect of precultures on gastruloids/Cell photo's/Hub/0 data marloes/2i tiff/splitObjects
 36%|██████████████████████████▍                                               | 15/42 [00:25<00:45,  1.70s/it]
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 51, in starmapstar
    return list(itertools.starmap(args[0], args[1]))
  File "C:\Users\dbax\OneDrive - Radboud Universiteit\Documenten\1. Protocols\morgana\MOrgAna\morgana\ImageTools\morphology\computemorphology.py", line 67, in compute_morphological_info
    N_points, tck = spline.compute_spline_coeff(ma,bf,anch)
  File "C:\Users\dbax\OneDrive - Radboud Universiteit\Documenten\1. Protocols\morgana\MOrgAna\morgana\ImageTools\morphology\spline.py", line 27, in compute_spline_coeff
    tck,_ = interpolate.splprep([anch[:,0],  anch[:,1]], k=k, s=k*500000)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\site-packages\scipy\interpolate\fitpack.py", line 155, in splprep
    res = _impl.splprep(x, w, u, ub, ue, k, task, s, t, full_output, nest, per,
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\site-packages\scipy\interpolate\_fitpack_impl.py", line 264, in splprep
    raise TypeError('m > k must hold')
TypeError: m > k must hold
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\dbax\OneDrive - Radboud Universiteit\Documenten\1. Protocols\morgana\MOrgAna\morgana\GUIs\mainwindow.py", line 982, in createMorphologyPlot
    data_all, keys = arrangemorphodata.collect_morpho_data(
  File "C:\Users\dbax\OneDrive - Radboud Universiteit\Documenten\1. Protocols\morgana\MOrgAna\morgana\DatasetTools\arrangemorphodata.py", line 51, in collect_morpho_data
    data = compute_morphological_info(input_folder)
  File "C:\Users\dbax\OneDrive - Radboud Universiteit\Documenten\1. Protocols\morgana\MOrgAna\morgana\DatasetTools\morphology\computemorphology.py", line 40, in compute_morphological_info
    data_list = list(   tqdm.tqdm(
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\site-packages\tqdm-4.60.0-py3.9.egg\tqdm\std.py", line 1178, in __iter__
    for obj in iterable:
  File "C:\Users\dbax\OneDrive - Radboud Universiteit\Documenten\1. Protocols\morgana\MOrgAna\morgana\DatasetTools\multiprocessing\istarmap.py", line 46, in <genexpr>
    return (item for chunk in result for item in chunk)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 868, in next
    raise value
TypeError: m > k must hold
Process SpawnPoolWorker-5:
Process SpawnPoolWorker-8:
Process SpawnPoolWorker-7:
Process SpawnPoolWorker-1:
Traceback (most recent call last):
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
Process SpawnPoolWorker-3:
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 290, in _send_bytes
    nwritten, err = ov.GetOverlappedResult(True)
BrokenPipeError: [WinError 109] The pipe has been ended

During handling of the above exception, another exception occurred:

  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
Traceback (most recent call last):
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 290, in _send_bytes
    nwritten, err = ov.GetOverlappedResult(True)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 290, in _send_bytes
    nwritten, err = ov.GetOverlappedResult(True)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
BrokenPipeError: [WinError 109] The pipe has been ended
BrokenPipeError: [WinError 109] The pipe has been ended
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))

During handling of the above exception, another exception occurred:

During handling of the above exception, another exception occurred:

  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 290, in _send_bytes
    nwritten, err = ov.GetOverlappedResult(True)
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
Traceback (most recent call last):
Traceback (most recent call last):
BrokenPipeError: [WinError 109] The pipe has been ended
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()

During handling of the above exception, another exception occurred:

  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))
BrokenPipeError: [WinError 232] The pipe is being closed
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 290, in _send_bytes
    nwritten, err = ov.GetOverlappedResult(True)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
BrokenPipeError: [WinError 109] The pipe has been ended
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])

During handling of the above exception, another exception occurred:

  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
BrokenPipeError: [WinError 232] The pipe is being closed
BrokenPipeError: [WinError 232] The pipe is being closed
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
BrokenPipeError: [WinError 232] The pipe is being closed
Process SpawnPoolWorker-2:
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
BrokenPipeError: [WinError 232] The pipe is being closed
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 290, in _send_bytes
    nwritten, err = ov.GetOverlappedResult(True)
BrokenPipeError: [WinError 109] The pipe has been ended

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
BrokenPipeError: [WinError 232] The pipe is being closed
Process SpawnPoolWorker-6:
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 290, in _send_bytes
    nwritten, err = ov.GetOverlappedResult(True)
BrokenPipeError: [WinError 109] The pipe has been ended

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
BrokenPipeError: [WinError 232] The pipe is being closed
(morgana) PS C:\Users\dbax\OneDrive - Radboud Universiteit\Documenten\1. Protocols\morgana\MOrgAna> Process SpawnPoolWorker-4:
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
BrokenPipeError: [WinError 232] The pipe is being closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
BrokenPipeError: [WinError 232] The pipe is being closed
Process SpawnPoolWorker-9:
Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 131, in worker
    put((job, i, result))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
BrokenPipeError: [WinError 232] The pipe is being closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\pool.py", line 136, in worker
    put((job, i, (False, wrapped)))
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\queues.py", line 365, in put
    self._writer.send_bytes(obj)
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 200, in send_bytes
    self._send_bytes(m[offset:offset + size])
  File "C:\Users\dbax\anaconda3\envs\morgana\lib\multiprocessing\connection.py", line 280, in _send_bytes
    ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True)
BrokenPipeError: [WinError 232] The pipe is being closed

Best, Danique

grinic commented 1 month ago

Hi Danique, sorry for the late reply. Did you manage to solve this issue? If not, please try reinstalling morgana on a fresh environment following the updated installation instructions on the repository page. We made some changes lately, hopefully this error got fixed.