Skip to content

Commit bac7571

Browse files
Merge pull request #10 from stewartboogert/datapandas
pandas: guard against trying to use data structures not in release
2 parents 26ac039 + b449b13 commit bac7571

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/pybdsim/DataPandas.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,11 @@ def __init__(self, filepath):
5858
self.e = self.root_file.GetEvent()
5959
self.et.GetEntry(0)
6060
self.sampler_names = list(self.root_file.GetSamplerNames())
61-
self.csampler_names = list(self.root_file.GetSamplerCNames())
62-
self.ssampler_names = list(self.root_file.GetSamplerSNames())
61+
try : # TODO needs to be removed when or guarded against with BDSIM version mismatch
62+
self.csampler_names = list(self.root_file.GetSamplerCNames())
63+
self.ssampler_names = list(self.root_file.GetSamplerSNames())
64+
except :
65+
pass
6366

6467
self.mt = self.root_file.GetModelTree()
6568
self.m = self.root_file.GetModel()

0 commit comments

Comments
 (0)