-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is there an existing issue for this?
- I have searched the existing issues
Expected Behavior
When using relative paths for file_tree specification i.e.
.\trees\bids_raw.tree
Inconsistent crashing occurs in the file_tree internal tree parsing. It sometimes works fine, currently it works fine when I run normally but in debug mode I get the following error. (I have also had the reverse where debug mode works, and normal does not)
Current Behavior
tree = FileTree.read(pars.file_tree_path)
TypeError: unsupported operand type(s) for +: 'WindowsPath' and 'str'
In this following method of code:
def search_tree(name: str) -> Union[Path, str, FileTree]:
"""
Search for the file defining the specific tree.
Iteratively searches through the directories in ``tree_directories`` till a file named ${name}.tree is found.
If not found in ``tree_directories`` the filetrees in installed python packages will be searched.
:param name: Name of the tree
:return: string containing the filetree definition
"""
for directory in tree_directories:
filename = op.join(directory, name)
if not filename.endswith(".tree"):
filename = filename + ".tree"
if op.exists(filename):
return Path(filename)
scan_plugins()
for ext in (".tree", ""):
if name + ext in available_subtrees:
return available_subtrees[name + ext]
raise ValueError("No file tree found for %s" % name)
Error message
No response
Environment
- OS:
- Python/Node version:
How to reproduce
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working