'TArray' has no attribute '__getitem__'

Hello,
This may be a stupid question - but it already ate 2h of my time so I’m going to ask anyway:

I’m doing this:

from ROOT import TH1F

And I’m getting this:

AttributeError: type object 'TArray' has no attribute '__getitem__'

During handling of the above exception, another exception occurred:

SystemError: <built-in method __subclasscheck__ of ROOT.PyRootType object at 0x7f960c2f2080> returned a result with an error set

During handling of the above exception, another exception occurred:

SystemError: <built-in method mro of ROOT.PyRootType object at 0x2be7448> returned a result with an error set
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'TH1F'

I’m using python 3.5.1 and root 6.06/08
root has been built with PYTHON_EXECUTABLE and PYTHON_INCLUDE_DIR pointing to the ‘correct’ python3 installation.

Any clues?
Thanks,
Wojtek

Would there be anybody able to help me…?
Not being able to use histograms is a pretty big drawback.
Thank you,
Wojtek

Hi,

Can you try v6.08?

Can you check that ROOTSYS, PATH, LD_LIBRARY_PATH (and DYLD_LIBRARY_PATH if on mac), PYTHONPATH (and anything else in the shell environment) point to the same (and only one) ROOT installation?

Cheers,
Philippe.

Thanks Philippe,
I built v6.08.02 and it seems to be working!
I had a bit of trouble with the build because cmake insisted on pointing to numpy from the system (python 2.7) rather then my 3.5 install - had to add -D NUMPY_INCLUDE_DIR="<my python/numpy includes>" for the build to work.
cheers,
Wojtek