42-AI / Elegant-Elegans

MIT License
3 stars 0 forks source link

[Bug]: Deprecated use of skimage library #42

Closed COTHSC closed 2 years ago

COTHSC commented 2 years ago

Description

Unable to use wfntp due to use of a library function that is no longer valid

What happened?

When starting a job with wfntp, the following error message is logged to the console: ValueError: Values other than "rc" for the "coordinates" argument to skimage.measure.regionprops are no longer supported. You should update your code to use "rc" coordinates and stop using the "coordinates" argument, or use skimage version 0.15.x or earlier.

Expected behaviour

wfntp should be able to compute measure normally

Environment

fedora 36 Conda environment set up as described

Steps to reproduce

Set up the conda environment as described in this repo, clone it and attempt to lauch wfntp and load then start a job, the bug should happen when computing the measures for the first frame

Relevant log output

The error was:
Traceback (most recent call last):
  File "/home/jcts/Documents/goinfre/Elegant-Elegans/WF_NTP/WF_NTP/WF_NTP_gui.py", line 305, in run_tracker
    print_data, bends = _run_tracker(settings, queue)
  File "/home/jcts/Documents/goinfre/Elegant-Elegans/WF_NTP/WF_NTP/WF_NTP_script.py", line 121, in run_tracker
    print_data, locations = track_all_locations(video, settings, stdout_queue)
  File "/home/jcts/Documents/goinfre/Elegant-Elegans/WF_NTP/WF_NTP/WF_NTP_script.py", line 221, in track_all_locations
    print_data = process_frame(settings, Z, mean_brightness,
  File "/home/jcts/Documents/goinfre/Elegant-Elegans/WF_NTP/WF_NTP/WF_NTP_script.py", line 287, in process_frame
    props = measure.regionprops(labeled_removed, coordinates='xy')
  File "/home/jcts/.conda/envs/v_wf_ntp/lib/python3.8/site-packages/skimage/measure/_regionprops.py", line 1279, in regionprops
    raise ValueError(msg)
ValueError: Values other than "rc" for the "coordinates" argument to skimage.measure.regionprops are no longer supported. You should update your code to use "rc" coordinates and stop using the "coordinates" argument, or use skimage version 0.15.x or earlier.

Proposed solution

use rc coordinates as indicated in the log output

madvid commented 2 years ago

Do not forget project and milestone on the right hand side pannel. This issue should be quick to solve