Description of problem: Import of ROOT fails in jupyter notebooks. It works though in python3 or ipython3 console. See, also: https://sft.its.cern.ch/jira/browse/ROOT-8459 As this Bug renders the package basically useless it would be very helpful if the upstream fix that happened in december could be pushed to the package. Version-Release number of selected component (if applicable): 6.08.06-2.fc25 How reproducible: 100% Steps to Reproduce: 1. install root, python3-jupyroot 2. open a jupyter notebook 3. try to "import ROOT" Actual results: import Error "no module named handlers" Expected results: successful report Additional info:
I filed this a month ago - is anybody reading this?
root-6.08.06-3.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
root-6.08.06-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
root-6.08.06-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
The Bug persists in root-6.08.06-3.fc25
root-6.08.06-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
(In reply to Nikolaus Trost from comment #7) > The Bug persists in root-6.08.06-3.fc25 The patch I applied corresponds to the changes made upstream to the pyroot bindings in the 6.08 git branch branch, i.e.: git diff v6-08-06 upstream/v6-08-00-patches -- bindings/pyroot If these changes are not sufficient, can you provide a list of commits that are needed in addition to address the issue? Does it involve changes made to the master branch that were not merged back to the 6.08 branch or changes to files outside the bindings/pyroot directory?
with root-6.08.06-3.el7 the error is a different one. I guess something went wrong with backporting that patch? I have a Fedora 25 VM set up, root , installed python2-root python2-jupyroot [trost@localhost ~]$ sudo dnf install root --enablerepo=updates-testing [sudo] Passwort für trost: Fedora 25 - x86_64 - Test Updates 7.2 MB/s | 3.3 MB 00:00 Letzte Prüfung auf abgelaufene Metadaten: vor 0:00:01 am Wed May 10 15:43:27 2017. Paket root-6.08.06-3.fc25.x86_64 ist bereits installiert, wird übersprungen. Abhängigkeiten sind aufgelöst. Nichts zu tun. Komplett! [trost@localhost ~]$ root --version ------------------------------------------------------------ | Welcome to ROOT 6.08/06 http://root.cern.ch | | (c) 1995-2016, The ROOT Team | | Built for linuxx8664gcc | | From tag v6-08-06, 2 March 2017 | | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' | ------------------------------------------------------------ As before import ROOT works in a shell [trost@localhost ~]$ python Python 2.7.13 (default, Jan 12 2017, 17:59:37) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ROOT >>> It also works within an ipython shell [trost@localhost ~]$ ipython Python 2.7.13 (default, Jan 12 2017, 17:59:37) Type "copyright", "credits" or "license" for more information. IPython 3.2.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import ROOT In [2]: However if i import it from a jupyter notebook i get a hell of a traceback (see below). Within the discussion at cern the last comment by Danilo Piparo says the issue has been fixed in master (https://sft.its.cern.ch/jira/browse/ROOT-8459?focusedCommentId=78846&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-78846) AFAIR this does not refer to the JupyROOT_fix.patch attached in the ticket but other commits in the ROOT repository. I contacted Danilo Piparo, the Assignee of that bug to get further information. Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 970, in get_records return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 233, in wrapped return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 267, in _fixed_getinnerframes records = fix_frame_records_filenames(inspect.getinnerframes(etb, context)) File "/usr/lib64/python2.7/inspect.py", line 1048, in getinnerframes framelist.append((tb.tb_frame,) + getframeinfo(tb, context)) File "/usr/lib64/python2.7/inspect.py", line 1012, in getframeinfo lines, lnum = findsource(frame) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 159, in findsource file = getsourcefile(object) or getfile(object) File "/usr/lib64/python2.7/inspect.py", line 443, in getsourcefile filename = getfile(object) File "/usr/lib64/python2.7/inspect.py", line 408, in getfile if ismethod(object): File "/usr/lib64/python2.7/site-packages/ROOT.py", line 117, in ismethod if type(object) == _root.MethodProxy: AttributeError: 'NoneType' object has no attribute 'MethodProxy' Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 970, in get_records return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 233, in wrapped return f(*args, **kwargs) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 267, in _fixed_getinnerframes records = fix_frame_records_filenames(inspect.getinnerframes(etb, context)) File "/usr/lib64/python2.7/inspect.py", line 1048, in getinnerframes framelist.append((tb.tb_frame,) + getframeinfo(tb, context)) File "/usr/lib64/python2.7/inspect.py", line 1008, in getframeinfo filename = getsourcefile(frame) or getfile(frame) File "/usr/lib64/python2.7/inspect.py", line 443, in getsourcefile filename = getfile(object) File "/usr/lib64/python2.7/inspect.py", line 408, in getfile if ismethod(object): File "/usr/lib64/python2.7/site-packages/ROOT.py", line 117, in ismethod if type(object) == _root.MethodProxy: AttributeError: 'NoneType' object has no attribute 'MethodProxy' ERROR: Internal Python error in the inspect module. Below is the traceback from this internal error. Unfortunately, your original traceback can not be constructed. ERROR: Internal Python error in the inspect module. Below is the traceback from this internal error. Unfortunately, your original traceback can not be constructed. Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/IPython/kernel/zmq/ipkernel.py", line 181, in do_execute shell.run_cell(code, store_history=store_history, silent=silent) File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2871, in run_cell interactivity=interactivity, compiler=compiler, result=result) File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 3000, in run_ast_nodes self.showtraceback() File "/usr/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 1851, in showtraceback value, tb, tb_offset=tb_offset) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 1240, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 1148, in structured_traceback self, etype, value, tb, tb_offset, number_of_lines_of_context File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 1000, in structured_traceback tb_offset) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 951, in format_exception_as_a_whole frames = self.format_records(records) File "/usr/lib/python2.7/site-packages/IPython/core/ultratb.py", line 724, in format_records for frame, file, lnum, func, lines, index in records: TypeError: 'NoneType' object is not iterable
With root-6.08.06-3.el7 the stack trace only appears in pyhton2. In python3 the old "no handlers" issue is unchanged
This is the behaviour when used with python2. When using python3 however the old "no handlers" issue is unchanged.
root-6.08.06-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-5.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
root-6.08.06-5.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
root-6.08.06-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-5.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-5.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
root-6.08.06-5.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-5.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
with root-6.08.06-5 the bug is finally fixed. Thanks a lot! :)
root-6.08.06-7.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-7.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
root-6.08.06-7.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-7.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
root-6.08.06-7.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c
root-6.08.06-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1544bb535d
root-6.08.06-7.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb
root-6.08.06-7.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b
The problem is solved, but now it is not possible to install python2-jupyroot and python3-jupyroot in parallel. before installing python2-jupyroot everything works, afterwards this happens. python3 Python 3.5.3 (default, May 10 2017, 15:05:55) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ROOT Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.5/site-packages/ROOT.py", line 24, in <module> import cppyy File "/usr/lib64/python3.5/site-packages/cppyy.py", line 60, in <module> import libPyROOT as _backend ImportError: dynamic module does not define module export function (PyInit_libPyROOT) If this can not be resolved (i read that ROOT must be compiled supporting either one or the other, this info may be outdated?) i guess the packages should at least conflict with each other?
I can not reproduce this: $ rpm -q python2-root python2-jupyroot python3-root python3-jupyroot python2-root-6.08.06-7.fc25.x86_64 python2-jupyroot-6.08.06-7.fc25.x86_64 python3-root-6.08.06-7.fc25.x86_64 python3-jupyroot-6.08.06-7.fc25.x86_64 $ python2 Python 2.7.13 (default, May 10 2017, 20:04:28) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ROOT >>> $ python3 Python 3.5.3 (default, May 10 2017, 15:05:55) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ROOT >>> If I do something not so clever and set the python path to the python 2 sitelib and run python 3 (which is a very strange thing to do) I can reproduce your error: $ PYTHONPATH=/usr/lib64/python2.7/site-packages python3Python 3.5.3 (default, May 10 2017, 15:05:55) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ROOT Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/site-packages/ROOT.py", line 24, in <module> import cppyy File "/usr/lib64/python2.7/site-packages/cppyy.py", line 60, in <module> import libPyROOT as _backend ImportError: dynamic module does not define module export function (PyInit_libPyROOT) >>> Do you have PYTHONPATH set?
OK not exactly the same error (the paths to the *.py files in the traceback are not the same as in your case). Setting the python path like this reproduces it though: $ PYTHONPATH=/usr/lib64/root python3 Python 3.5.3 (default, May 10 2017, 15:05:55) [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ROOT Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.5/site-packages/ROOT.py", line 24, in <module> import cppyy File "/usr/lib64/python3.5/site-packages/cppyy.py", line 60, in <module> import libPyROOT as _backend ImportError: dynamic module does not define module export function (PyInit_libPyROOT) >>>
You are spot on. i had /usr/lib64/root still in my PYTHONPATH (at some point that helped, though ^^). Sorry for the fuzz
root-6.08.06-7.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
root-6.08.06-7.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.
oh, will this also be pushed to the Centos Epel stable? Its in testing, but so far i have not seen it stable
nevermind. just saw its out in bodhi, just not propagated through to the mirror yet
EPEL has a minimum requirement of 14 days in testing before pushing to stable, while Fedora requires 7 days. So EPEL updates will always be later than the corresponding Fedora updates. Unless the time limit can be ignored with the help of enough positive karma votes from logged in (i.e. non-anonymous) users on the update in bodhi.
root-6.08.06-7.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.
root-6.08.06-7.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.