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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

tox 3.12, windows, python2.7: "Environment can only contain strings" #1313

Closed
asottile opened this issue May 23, 2019 · 2 comments
Closed

tox 3.12, windows, python2.7: "Environment can only contain strings" #1313

asottile opened this issue May 23, 2019 · 2 comments

Comments

@asottile
Copy link
Member

@asottile asottile commented May 23, 2019

Failure on azure pipelines: https://asottile.visualstudio.com/asottile/_build/results?buildId=666

seems appropriate that it's build 666 馃槅

========================== Starting Command Output ===========================
##[command]"C:\windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "D:\a\_temp\3cdf255c-2d87-431f-b791-57d8ea367b05.cmd""
GLOB sdist-make: D:\a\1\s\setup.py
Traceback (most recent call last):
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\hostedtoolcache\windows\Python\2.7.14\x64\Scripts\tox.exe\__main__.py", line 9, in <module>
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\session\__init__.py", line 44, in cmdline
    main(args)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\session\__init__.py", line 68, in main
    exit_code = session.runcommand()
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\session\__init__.py", line 192, in runcommand
    return self.subcommand_test()
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\session\__init__.py", line 208, in subcommand_test
    venv.package = self.hook.tox_package(session=self, venv=venv)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\pluggy\hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\pluggy\manager.py", line 68, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\pluggy\manager.py", line 62, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\pluggy\callers.py", line 208, in _multicall
    return outcome.get_result()
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\pluggy\callers.py", line 81, in get_result
    _reraise(*ex)  # noqa
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\pluggy\callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\package\__init__.py", line 16, in tox_package
    session.package, session.dist = get_package(session)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\package\__init__.py", line 29, in get_package
    package = acquire_package(config, session)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\package\__init__.py", line 40, in acquire_package
    path = build_package(config, session)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\package\builder\__init__.py", line 7, in build_package
    return make_sdist(config, session)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\package\builder\legacy.py", line 29, in make_sdist
    returnout=True,
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\site-packages\tox\action.py", line 93, in popen
    else 0
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\subprocess.py", line 390, in __init__
    errread, errwrite)
  File "c:\hostedtoolcache\windows\python\2.7.14\x64\lib\subprocess.py", line 640, in _execute_child
    startupinfo)
TypeError: environment can only contain strings
##[error]Cmd.exe exited with code '1'.

will look into what caused this next!

@asottile
Copy link
Member Author

@asottile asottile commented May 23, 2019

(Pdb) p [k for k, v in os.environ.items() if isinstance(k, unicode)]
[u'TOX_WORK_DIR']

seems the culprit probably

@asottile
Copy link
Member Author

@asottile asottile commented May 23, 2019

via #1314

@asottile asottile closed this May 23, 2019
@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant