Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python API radiomics error #427

Open
Kenneth-Schroeder opened this issue Feb 13, 2025 · 0 comments
Open

python API radiomics error #427

Kenneth-Schroeder opened this issue Feb 13, 2025 · 0 comments

Comments

@Kenneth-Schroeder
Copy link

I tried running totalsegmentator through the python API with the radiomics parameter enabled, but unfortunately, I am getting this error.

15:59:20Traceback (most recent call last):
15:59:20  File "/valohai/repository/valohai/run_totalsegmentator.py", line 164, in process_single_image
15:59:20    result = totalsegmentator(
15:59:20             ^^^^^^^^^^^^^^^^^
15:59:20  File "/usr/local/lib/python3.11/dist-packages/totalsegmentator/python_api.py", line 632, in totalsegmentator
15:59:20    input_path = tmp_folder / "ct.nii.gz"
15:59:20                 ~~~~~~~~~~~^~~~~~~~~~~~~
15:59:20TypeError: unsupported operand type(s) for /: 'str' and 'str'

I believe tmp_folder here will be a string, and for concatenation to work through slashes you need something like pathlib Paths.

with tempfile.TemporaryDirectory(prefix="radiomics_tmp_") as tmp_folder:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant