Import ROOT works only on second try?

Dear readers,

Here’s my info.
Root version: v5-34-00-patches
Operating system: mac osx 10.9 (Mavericks)
XCode version: 5.0.1 (latest as of this post)

Root compiled fine. I’ve run “xcode -select --install” just fine (suggested by many previous posts).

I get an error upon importing ROOT in python:

[code]sandbox153:mac davidkaleko$ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

import ROOT
Traceback (most recent call last):
File “”, line 1, in
File “/Applications/BasicSoftware/root/lib/ROOT.py”, line 257, in
_root.gPad = _ExpandMacroFunction( “TVirtualPad”, “Pad” )
File “/Applications/BasicSoftware/root/lib/ROOT.py”, line 237, in init
c = _root.MakeRootClass( klass )
AttributeError: type object ‘string’ has no attribute ‘c_str’
import ROOT
[/code]

As shown above, importing ROOT the 2nd time doesn’t cause an error message, and I can draw TCanvas/TPad without a problem.
Still, I don’t feel comfortable with this error message obviously… does anyone have a same issue and/or know a fix? This (along with many other problems) started when I upgraded to Mavericks OS (and updated xcode).

Yes, I just posted a similar problem.
I hadn’t realised that it worked the second
time.

Hi,

I have yet to try anything on 10.9 … still rebuilding macports (and not all ports work in the first place). However, the above looks like a Python error occurring in a place after which it is not checked, then propagating to the next, innocent, Python statement (Python errors are stored as global variables per thread) and then being reported there. If so, then that can also explain why the 2nd time does work.

Anyway, give me a bit of time to figure out this 10.9 business. :}

Cheers,
Wim

Hello,

I’d just like to request a fix or a work-around as soon as possible. I understand it’s a very new issue, but a working pyROOT on OS X 10.9 is critical thing for me.

Thanks a lot,

Javier

Javier,

the qt4-mac port finally seems working (building at this very moment), so by tomorrow morning I should have a working machine again.

Cheers,
Wim

Hi,

fixed in v5-34-00-patches. The dictionary for ‘std::string’ is not loaded (and std::string isn’t available in the first place, only ‘string’ which is also a python module, hence that specific error as the module hasn’t a c_str()).

Cheers,
Wim