Hi Wim,

thanks! Here’s a script that illustrates the problem that I’m having. In my case, it complains about the _data object being not iterable:

(I will try your other suggestions, they might help sidestep the problem)

```
#!/usr/bin/env python
from ROOT import RooWorkspace
from ROOT import RooAbsData
from ROOT import RooDataSet
from ROOT import RooFit
wspace = RooWorkspace('wspace')
# make model (taken from roostats tutorials)
wspace.factory("Poisson::on(non[0,1000], sum::splusb(s[40,0,100],b[100,0,300]))")
wspace.factory("Poisson::off(noff[0,5000], prod::taub(b,tau[5,3,7],rho[1,0,2]))")
wspace.factory("Poisson::onbar(nonbar[0,10000], bbar[1000,500,2000])")
wspace.factory("Poisson::offbar(noffbar[0,1000000], prod::lambdaoffbar(bbar, tau))")
wspace.factory("Gaussian::mcCons(rhonom[1.,0,2], rho, sigma[.2])")
wspace.factory("PROD::model(on,off,onbar,offbar,mcCons)")
wspace.defineSet("obs","non,noff,nonbar,noffbar,rhonom")
data = wspace.pdf("model").generate(wspace.set("obs"),1)
data2 = wspace.pdf("model").generate(wspace.set("obs"),1, RooFit.Name('data2'))
data3 = wspace.pdf("model").generate(wspace.set("obs"),1, RooFit.Name('data3'))
data4 = wspace.pdf("model").generate(wspace.set("obs"),1, RooFit.Name('data4'))
data.Print("v");
getattr(wspace, 'import')(data)
getattr(wspace, 'import')(data2)
getattr(wspace, 'import')(data3)
getattr(wspace, 'import')(data4)
wspace.Print()
_data = wspace.allData()
for ds in _data:
print ds
```