openneuropet / PET2BIDS

PET2BIDS helps you convert your PET data into BIDS! raw PET scanner files (e.g. ecat, dicom) and additional side files like .e.g excel sheets -- paper @JOSS https://doi.org/10.21105/joss.06067
https://pet2bids.readthedocs.io
MIT License
25 stars 20 forks source link

'template_json.json' don't found. #274

Closed EnriqueFV closed 1 month ago

EnriqueFV commented 6 months ago

I everyone,

I have tried to use PET2BIDS on my data but it fails with 'template_json.json' don't found as:

FileNotFoundError: [Errno 2] No such file or directory: '..\.venv\Lib\metadata\template_json.json' FileNotFoundError: [Errno 2] No such file or directory: '..\.venv\Lib\site-packages\pypet2bids\template_json.json'

I tried with different Python versions (3.9, 3.10, and 3.11) and still can't make use of the command pypet2bids.

I just installed the package via pip.

I am on Windows 11 and using VS code.

bendhouseart commented 6 months ago

@EnriqueFV windows doesn't get as much love or testing as Mac and Linux do because it's (often) a headache dealing with all of the fun and interesting ways that Windows handles file paths. Relative paths might be the issue here, but I'm not sure without seeing the full command you're using to execute your conversions. Could you share the following:

  1. Command given that returns that error message?
  2. The output from cd?
  3. Try running where dcm2niix4pet as well?

In the meantime you should be able to fix this issue by copying over the template_json.json file here to .\.venv\Lib\site-packages\pypet2bids\template_json.json on your system.

bendhouseart commented 6 months ago

In the meantime I'll work on testing this on my windows machine to see if I'm able to reproduce it and begin to reintroduce some testing here on github with their windows based action runners.

Thanks for bringing this to our attention