scikit-hep/root_pandas

Error if first file of the list does not contain the tree

gdujany opened this issue · 1 comments

Sometimes one has many files that are supposed to contain the tree one is interested in but, due for example to a tight selection, some may not contain the tree. It is nice however to be able go blindly give the list of files without worrying which ones contain the tree and which ones do not.

If the file with the missing tree is not the first one that can be achieved in read_root by the option warn_missing_tree=True that is passed to root_numpy.root2array. Instead, if the first file miss the tree there is an error because of https://github.com/scikit-hep/root_pandas/blob/master/root_pandas/readwrite.py#L163 (seed_path = paths[0])

Thanks for the report, it's fixed in version v0.3.5.

(Not deployed yet but should be on PyPI shortly.)