Bug 1437135 - Upstream Bug in python3-jupyroot
Summary: Upstream Bug in python3-jupyroot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: root
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mattias Ellert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-29 15:15 UTC by Nikolaus Trost
Modified: 2017-06-11 16:15 UTC (History)
3 users (show)

Fixed In Version: root-6.08.06-7.fc24 root-6.08.06-7.fc25 root-6.08.06-7.el7 root-6.08.06-7.fc26
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-27 02:51:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Nikolaus Trost 2017-03-29 15:15:58 UTC
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:

Comment 1 Nikolaus Trost 2017-04-20 11:51:29 UTC
I filed this a month ago - is anybody reading this?

Comment 2 Fedora Update System 2017-04-23 05:36:48 UTC
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

Comment 3 Fedora Update System 2017-04-23 05:36:57 UTC
root-6.08.06-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b

Comment 4 Fedora Update System 2017-04-23 05:37:02 UTC
root-6.08.06-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb

Comment 5 Fedora Update System 2017-04-23 05:37:07 UTC
root-6.08.06-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c

Comment 6 Fedora Update System 2017-04-25 03:53:00 UTC
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

Comment 7 Nikolaus Trost 2017-04-25 13:54:58 UTC
The Bug persists in root-6.08.06-3.fc25

Comment 8 Fedora Update System 2017-04-25 19:25:06 UTC
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

Comment 9 Fedora Update System 2017-04-25 21:27:20 UTC
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

Comment 10 Fedora Update System 2017-04-25 23:18:01 UTC
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

Comment 11 Mattias Ellert 2017-04-26 08:28:38 UTC
(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?

Comment 12 Nikolaus Trost 2017-05-10 14:12:43 UTC
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

Comment 13 Nikolaus Trost 2017-05-11 08:01:27 UTC
With root-6.08.06-3.el7 the stack trace only appears in pyhton2. In python3 the old "no handlers" issue is unchanged

Comment 14 Nikolaus Trost 2017-05-11 12:55:32 UTC
This is the behaviour when used with python2.
When using python3 however the old "no handlers" issue is unchanged.

Comment 15 Fedora Update System 2017-05-14 14:24:11 UTC
root-6.08.06-5.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c

Comment 16 Fedora Update System 2017-05-14 14:27:07 UTC
root-6.08.06-5.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b

Comment 17 Fedora Update System 2017-05-14 14:31:28 UTC
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

Comment 18 Fedora Update System 2017-05-14 17:01:36 UTC
root-6.08.06-5.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb

Comment 19 Fedora Update System 2017-05-15 06:33:28 UTC
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

Comment 20 Fedora Update System 2017-05-15 06:34:15 UTC
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

Comment 21 Fedora Update System 2017-05-15 10:19:21 UTC
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

Comment 22 Fedora Update System 2017-05-15 11:05:15 UTC
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

Comment 23 Nikolaus Trost 2017-05-15 11:06:06 UTC
with root-6.08.06-5 the bug is finally fixed.
Thanks a lot! :)

Comment 24 Fedora Update System 2017-05-17 06:45:30 UTC
root-6.08.06-7.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4880048a1c

Comment 25 Fedora Update System 2017-05-17 06:47:12 UTC
root-6.08.06-7.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c39ad1072b

Comment 26 Fedora Update System 2017-05-17 06:48:55 UTC
root-6.08.06-7.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-13bcac36bb

Comment 27 Fedora Update System 2017-05-17 06:49:59 UTC
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

Comment 28 Fedora Update System 2017-05-17 19:06:50 UTC
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

Comment 29 Fedora Update System 2017-05-17 21:30:15 UTC
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

Comment 30 Fedora Update System 2017-05-17 23:06:44 UTC
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

Comment 31 Fedora Update System 2017-05-17 23:11:15 UTC
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

Comment 32 Nikolaus Trost 2017-05-18 15:06:43 UTC
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?

Comment 33 Mattias Ellert 2017-05-18 16:38:08 UTC
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?

Comment 34 Mattias Ellert 2017-05-18 16:44:06 UTC
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)
>>>

Comment 35 Nikolaus Trost 2017-05-18 17:04:15 UTC
You are spot on. i had /usr/lib64/root still in my PYTHONPATH (at some point that helped, though ^^). Sorry for the fuzz

Comment 36 Fedora Update System 2017-05-27 02:51:39 UTC
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.

Comment 37 Fedora Update System 2017-05-27 03:00:19 UTC
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.

Comment 38 Nikolaus Trost 2017-06-01 09:46:48 UTC
oh, will this also be pushed to the Centos Epel stable? Its in testing, but so far i have not seen it stable

Comment 39 Nikolaus Trost 2017-06-01 09:49:27 UTC
nevermind. just saw its out in bodhi, just not propagated through to the mirror yet

Comment 40 Mattias Ellert 2017-06-01 11:07:56 UTC
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.

Comment 41 Fedora Update System 2017-06-01 15:54:26 UTC
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.

Comment 42 Fedora Update System 2017-06-11 16:15:51 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.