Jupyter Module Load ValueError


If I create anew Python 2 notebook in Juypter and simply try to load the ROOT module (python 2 bindings built for ROOT 6.10.04) I get the following error (these do not appear when using python or ipython from the terminal):

import ROOT

ValueError                                Traceback (most recent call last)
<ipython-input-1-b332e25ada1f> in <module>()
----> 1 import ROOT

/opt/root/6.10.04/lib/ROOT.pyc in <module>()
    614    ip = get_ipython()
    615    if hasattr(ip,"kernel"):
--> 616       import JupyROOT
    617       import JsMVA

/opt/root/6.10.04/lib/ROOT.pyc in _importhook(name, *args, **kwds)
    316       except Exception:
    317          pass
--> 318    return _orig_ihook( name, *args, **kwds )
    320 __builtin__.__import__ = _importhook

/opt/root/6.10.04/lib/JupyROOT/__init__.py in <module>()
      3 if '__IPYTHON__' in __builtins__ and __IPYTHON__:
      4     cppcompleter.load_ipython_extension(get_ipython())
----> 5     utils.iPythonize()

/opt/root/6.10.04/lib/JupyROOT/utils.py in iPythonize()
    500 def iPythonize():
    501     setStyle()
--> 502     loadMagicsAndCapturers()
    503     declareProcessLineWrapper()
    504     #enableCppHighlighting()

/opt/root/6.10.04/lib/JupyROOT/utils.py in loadMagicsAndCapturers()
    473     for extName in extNames:
    474         extMgr.load_extension(extName)
--> 475     captures.append(StreamCapture())
    476     captures.append(CaptureDrawnPrimitives())

/opt/root/6.10.04/lib/JupyROOT/utils.py in __init__(self, ip)
    241         self.errString = ""
--> 243         self.asyncCapturer = handlers.Runner(self.syncCapture)
    245         self.isFirstPreExecute = True

/opt/root/6.10.04/lib/JupyROOT/handlers.py in __init__(self, function)
     97         self.function = function
     98         if platform != 'darwin':
---> 99             setrlimit(RLIMIT_STACK,(RLIM_INFINITY,RLIM_INFINITY))
    100         self.thread = None

ValueError: current limit exceeds maximum limit

Any thoughts on a resolution would be appreciated.



what was the cmake configuration line you used? Is the SIP of your laptop on or did you deactivate it?


SIP = Session Initiation Protocol? I have made no changes that impact this to my knowledge.

Unfortunately, the CMake configuration is gone now as I was trying to get the python 3 binding built (another topic). I can rebuild this again and provide the cache. I typically use python=ON, geocad=ON, gdml=ON, minuit2=ON, moremath=ON and CMAKE_INSTALL_PREFIX=/opt/root/6.10.04.

Are you absloutely sure that this is a clean build, immune from problems linked to the mixing of py2 and py3 bindings generation?


Yes this issue came up before I ventured down that path. I will rebuild ROOT again from scratch (delete the build and prefix directories first) to confirm. (I am now keeping the py2 and py3 builds separate as you pointed out that they cannot be built simultaneously). I can test it more quickly with ROOT 6.09 if that would be useful.

I’ve reinstalled ROOT and confirm that I still have the same error. I’ve attached the CMakeCache in case ther are further questions about the configuration.
CMakeCache.txt (122.1 KB)


I’ve just pushed a fix to ROOT master and 6.10 patches:


In short, we are not setting the maximum stack size anymore since it demonstrated to be problematic.

Please let us know if this solves your issue.



Works as expected with the ROOT master branch.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.