With python3-libcec and libcec installed, "import cec" fails. This worked previously on Fedora 24... something to do with the libcec 3.1.0 update maybe? It seems to be some sort of path or path+swig issue? The following workaround works: $ cd /usr/lib64/python3.5/site-packages/cec $ python3 >>> import cec >>> As does: $ python3 >>> import sys >>> sys.path.append("/usr/lib64/python3.5/site-packages/cec") >>> import cec >>> Without workarounds, the following happens: $ python3 >>> import cec Traceback (most recent call last): File "/usr/lib64/python3.5/site-packages/cec/__init__.py", line 18, in swig_import_helper return importlib.import_module(mname) File "/usr/lib64/python3.5/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 986, in _gcd_import File "<frozen importlib._bootstrap>", line 969, in _find_and_load File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked ImportError: No module named '_cec' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.5/site-packages/cec/__init__.py", line 21, in <module> _cec = swig_import_helper() File "/usr/lib64/python3.5/site-packages/cec/__init__.py", line 20, in swig_import_helper return importlib.import_module('_cec') File "/usr/lib64/python3.5/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ImportError: No module named '_cec' >>>
Does it fail with python2? Can you try version 4 in rawhide or attach a small reproducer?
There are no Python 2 bindings for libcec on F25 - only python3-libcec. Same problem using libcec-4.0.0-1.fc26.x86_64.rpm, platform-2.1.0.1-1.fc26.x86_64.rpm and python3-libcec-4.0.0-1.fc26.x86_64.rpm from Rawhide, installed on F25. Reproduction is as straightforward as below on F25 - was there something else you were looking for? $ sudo dnf install libcec python3-libcec $ python3 >>> import cec (fails with above exceptions)
can you try 4.0.1 when you get a moment?
Identical error with 4.0.1.
Still present in F26 with libcec-4.0.2-3.fc26: >>> import cec Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/cec/__init__.py", line 14, in swig_import_helper return importlib.import_module(mname) File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 978, in _gcd_import File "<frozen importlib._bootstrap>", line 961, in _find_and_load File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked ModuleNotFoundError: No module named '_cec' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.6/site-packages/cec/__init__.py", line 17, in <module> _cec = swig_import_helper() File "/usr/lib64/python3.6/site-packages/cec/__init__.py", line 16, in swig_import_helper return importlib.import_module('_cec') File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ModuleNotFoundError: No module named '_cec' So, exactly the same, except now with python-3.6. The workaround still works but needed an updated path (I noticed because my program broke after updating to F26). What needs to be done to get this fixed?
> What needs to be done to get this fixed? Report it upstream and get it fixed there and then we just consume the upstream fix
OK, I had a look upstream and seems like it might be a misuse of SWIG that no longer works. https://github.com/Pulse-Eight/libcec/issues/356 Just renaming cec/__init__.py to cec/cec.py seems to be enough to fix this downstream for Python 3.6 (presumably 3.5 as well).
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Should be fixed in upstream master (see linked bug above) but no releases since the fix, so testing this on Fedora is pending.
This message is a reminder that Fedora 27 is nearing its end of life. On 2018-Nov-30 Fedora will stop maintaining and issuing updates for Fedora 27. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '27'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 27 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still broken in F29. Looks like it was probably (?) fixed upstream ~ 3 weeks ago.
libcec-4.0.3-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-7202bb344e
libcec-4.0.3-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-241639ab73
The 4.0.3-2 python3-libcec package newly requires python33, presumably it's not supposed to?
(In reply to fednuc from comment #14) > The 4.0.3-2 python3-libcec package newly requires python33, presumably it's > not supposed to? On which release? There's a new dep generator in rawhide that might be causing issues
libcec-4.0.3-2.fc28 has been pushed to the Fedora 28 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-2018-7202bb344e
libcec-4.0.3-2.fc29 has been pushed to the Fedora 29 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-2018-241639ab73
> On which release? There's a new dep generator in rawhide that might be causing issues On Fedora 28. Fedora 29 seems fine.
libcec-4.0.3-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
libcec-4.0.3-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.
Confirmed fixed/working with 4.0.3-2.