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

Github action using windows-latest causes 'answer' to be None causing a TypeError #2077

Closed
aroberge opened this issue May 29, 2021 · 3 comments
Labels
bug:normal affects many people or has quite an impact

Comments

@aroberge
Copy link

I have not been able to reproduce the following error locally: only when using tox as part of a github action. Everything works on ubuntu-latest and macos-latest, but fails with windows-latest. As it might not be reproducible locally, feel free to close this issue if you deem it appropriate.

The github action configuration file is https://github.com/aroberge/friendly/blob/master/.github/workflows/tests.yml

A typical traceback generated is as follows:

 File "c:\hostedtoolcache\windows\python\3.9.5\x64\lib\site-packages\tox\session\__init__.py", line 44, in cmdline
    main(args)
  File "c:\hostedtoolcache\windows\python\3.9.5\x64\lib\site-packages\tox\session\__init__.py", line 69, in main
    exit_code = session.runcommand()
ERROR: invocation failed (exit code 1), logfile: D:\a\friendly\friendly\.tox\py36\log\py36-5.log
  File "c:\hostedtoolcache\windows\python\3.9.5\x64\lib\site-packages\tox\session\__init__.py", line 197, in runcommand
    return self.subcommand_test()
  File "c:\hostedtoolcache\windows\python\3.9.5\x64\lib\site-packages\tox\session\__init__.py", line 225, in subcommand_test
    run_sequential(self.config, self.venv_dict)
  File "c:\hostedtoolcache\windows\python\3.9.5\x64\lib\site-packages\tox\session\commands\run\sequential.py", line 9, in run_sequential
    if venv.setupenv():
  File "c:\hostedtoolcache\windows\python\3.9.5\x64\lib\site-packages\tox\venv.py", line 656, in setupenv
    envlog.set_python_info(command_path)
  File "c:\hostedtoolcache\windows\python\3.9.5\x64\lib\site-packages\tox\logs\env.py", line 18, in set_python_info
    answer["executable"] = python_executable
TypeError: 'NoneType' object does not support item assignment
@aroberge aroberge added the bug:normal affects many people or has quite an impact label May 29, 2021
@aroberge
Copy link
Author

This issue appears to have been caused by the presence of a separate .coveragerc file while having a [coverage:run] section also in tox.ini. Removing that section has gotten rid of the problem.

@aroberge
Copy link
Author

If anyone is reading this: the error reappeared. Github actions seem to be flakey.

@BeyondEvil
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:normal affects many people or has quite an impact
Projects
None yet
Development

No branches or pull requests

2 participants