Bug 1757179 - ModuleNotFoundError: No module named 'yaml' when running tpm2_ptool
Summary: ModuleNotFoundError: No module named 'yaml' when running tpm2_ptool
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: tpm2-pkcs11
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: IoT
TreeView+ depends on / blocked
 
Reported: 2019-09-30 18:37 UTC by nicolasoliver03
Modified: 2019-12-19 01:22 UTC (History)
2 users (show)

Fixed In Version: tpm2-pkcs11-0-0.8.20191011git0b7ceff.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-15 21:26:50 UTC
Type: Bug


Attachments (Terms of Use)

Description nicolasoliver03 2019-09-30 18:37:12 UTC
Description of problem:
ModuleNotFoundError: No module named 'yaml' when running tpm2_ptool

Version-Release number of selected component (if applicable):
tpm2-pkcs11-tools-0-0.3.20190219git1e84553.fc31.x86_64

How reproducible:
dnf install tpm2-pkcs11-tools
tpm2_ptool init --pobj-pin=mypobjpin --path=~/tmp

Steps to Reproduce:
1. dnf install tpm2-pkcs11-tools
2. tpm2_ptool init --pobj-pin=mypobjpin --path=~/tmp
3. crash

Actual results:
Traceback (most recent call last):
  File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.7/site-packages/tpm2_pkcs11/tpm2_ptool.py", line 5, in <module>
    from .commandlets_store import InitCommand  # pylint: disable=unused-import
  File "/usr/lib/python3.7/site-packages/tpm2_pkcs11/commandlets_store.py", line 6, in <module>
    import yam

Expected results:
Created a primary object of id: 1

Additional info:

Comment 1 Jakub Jelen 2019-10-11 09:01:15 UTC
Thank you for the report.

If I read your bug report correctly, you are saying you are missing the python3-pyyaml dependency in the tools subpackage package.

If I see right, the latest version of tpm2-pkcs11 already provides the requires.txt so the requirements should get resolved automatically, but that is not what I see when I try to build it locally on my Fedora 30.

So I will update to the current snapshot and add explicit requires.

Comment 2 Fedora Update System 2019-10-11 12:42:29 UTC
FEDORA-2019-ce5d61669f has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ce5d61669f

Comment 3 Fedora Update System 2019-10-11 16:53:57 UTC
tpm2-pkcs11-0-0.8.20191011git0b7ceff.fc31 has been pushed to the Fedora 31 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-2019-ce5d61669f

Comment 4 nicolasoliver03 2019-11-15 21:26:13 UTC
Works fine now!

  [root@fedora-server-1 ~]# rpm -qa tpm2-pkcs11-tools
  tpm2-pkcs11-tools-0-0.8.20191011git0b7ceff.fc31.x86_64

  [root@fedora-server-1 ~]# tpm2_ptool init --pobj-pin=mypobjpin --path=~/tmp
  Created a primary object of id: 1

Thanks

Comment 5 Fedora Update System 2019-12-19 01:22:44 UTC
tpm2-pkcs11-0-0.8.20191011git0b7ceff.fc31 has been pushed to the Fedora 31 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.