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

tonii_all fails with cryptic error if run on single dataset #43

Closed
mabast85 opened this issue Mar 5, 2021 · 4 comments · Fixed by #47
Closed

tonii_all fails with cryptic error if run on single dataset #43

mabast85 opened this issue Mar 5, 2021 · 4 comments · Fixed by #47

Comments

@mabast85
Copy link

mabast85 commented Mar 5, 2021

Hi,

I am having an issue when trying to convert my own study using tonii_all.
I get the following message:

$ brkraw tonii_all /Users/matteob/RatScans/20210302_100344_B_B_rat4d_1_1
Traceback (most recent call last):
File "/Users/matteob/miniconda3/miniconda3/envs/myfslpython603/bin/brkraw", line 8, in
sys.exit(main())
File "/Users/matteob/miniconda3/miniconda3/envs/myfslpython603/lib/python3.7/site-packages/brkraw/scripts/brkraw.py", line 184, in main
study = BrukerLoader(sub_path)
File "/Users/matteob/miniconda3/miniconda3/envs/myfslpython603/lib/python3.7/site-packages/brkraw/lib/loader.py", line 93, in init
self._pvobj = load(path)
File "/Users/matteob/miniconda3/miniconda3/envs/myfslpython603/lib/python3.7/site-packages/brkraw/lib/loader.py", line 21, in load
return PvDatasetDir(path)
File "/Users/matteob/miniconda3/miniconda3/envs/myfslpython603/lib/python3.7/site-packages/brkraw/lib/pvobj.py", line 145, in init
self._parse_info()
File "/Users/matteob/miniconda3/miniconda3/envs/myfslpython603/lib/python3.7/site-packages/brkraw/lib/pvobj.py", line 160, in _parse_info
if len(root.split(os.sep)) == root_path_fregs + 1:
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

It does not help if I am in the parent directory or not, the error is the same. Any ideas what may be going wrong?

In the 20210302_100344_B_B_rat4d_1_1 folder I have the structure shown in the two attached images.
I am using brkraw version 0.3.6

Screenshot 2021-03-05 at 13 29 42

Screenshot 2021-03-05 at 13 30 00

@gdevenyi
Copy link
Collaborator

gdevenyi commented Mar 5, 2021

This has already been brought up before by me, though it needs to be fixed, tonii_all is intended to be used on a directory which contains directories which contain bruker datasets.

#2 (comment)

If you intend to convert one dataset, use tonii.

Please change title to "tonii_all fails with cryptic error if run on single dataset"

@mabast85 mabast85 changed the title tonii_all tonii_all fails with cryptic error if run on single dataset Mar 5, 2021
@mabast85
Copy link
Author

mabast85 commented Mar 5, 2021

Thanks very much for your help, it worked on the parent directory using the tonii option.
I changed the title for your record.

Just noticed a typo as well while running the conversion:
"NifTi file is genetared..."

@ycAbout
Copy link
Contributor

ycAbout commented Mar 18, 2021

Hi @mabast85 , where do you find brkraw version 0.3.6? the newest released one is v 0.3.4?

@gdevenyi
Copy link
Collaborator

Hi @mabast85 , where do you find brkraw version 0.3.6? the newest released one is v 0.3.4?

https://github.com/BrkRaw/bruker/blob/master/brkraw/__init__.py#L3

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

Successfully merging a pull request may close this issue.

3 participants