Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: 'tmt tests export' is not compatible with python-3.6 #337

Closed
The-Mule opened this issue Sep 2, 2020 · 0 comments · Fixed by #338
Closed

BUG: 'tmt tests export' is not compatible with python-3.6 #337

The-Mule opened this issue Sep 2, 2020 · 0 comments · Fixed by #338
Assignees
Labels
bug Something isn't working command | export The export command command | tests tmt tests command

Comments

@The-Mule
Copy link
Contributor

The-Mule commented Sep 2, 2020

Runing tmt tests epxport on RHEL-8 fails with the following traceback:

Traceback (most recent call last):
  File "/usr/bin/tmt", line 8, in <module>
    tmt.cli.main()
  File "/usr/lib/python3.6/site-packages/click/core.py", line 721, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 1065, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.6/site-packages/click/core.py", line 1065, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.6/site-packages/click/core.py", line 894, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.6/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/tmt/cli.py", line 427, in export
    test.export(format_='nitrate', create=create, general=general)
  File "/usr/lib/python3.6/site-packages/tmt/base.py", line 318, in export
    tmt.export.export_to_nitrate(self, create, general)
  File "/usr/lib/python3.6/site-packages/tmt/export.py", line 168, in export_to_nitrate
    fmf_id = test.fmf_id
  File "/usr/lib/python3.6/site-packages/tmt/base.py", line 95, in fmf_id
    origin = run('git config --get remote.origin.url')
  File "/usr/lib/python3.6/site-packages/tmt/base.py", line 89, in run
    result = subprocess.run(command.split(), capture_output=True)
  File "/usr/lib64/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

It turns out that this issue is related to difference between python 3.6 and 3.7. Please notice that RHEL-8 contains python.3.6 only.

@psss psss self-assigned this Sep 2, 2020
@psss psss added bug Something isn't working command | export The export command command | tests tmt tests command labels Sep 2, 2020
psss added a commit that referenced this issue Sep 2, 2020
Do not use capture_output as it is a Python 3.7+ feature.
Use dict_to_yaml() to prevent the one-line json fmf id.
psss added a commit that referenced this issue Sep 3, 2020
Do not use capture_output as it is a Python 3.7+ feature.
Use dict_to_yaml() to prevent the one-line json fmf id.
Correctly substitute git+ssh links for git repositories.
@psss psss closed this as completed in 34f234a Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working command | export The export command command | tests tmt tests command
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants