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

ValueError: need more than 1 value to unpack #104

Closed
asmodehn opened this issue Apr 18, 2018 · 9 comments
Closed

ValueError: need more than 1 value to unpack #104

asmodehn opened this issue Apr 18, 2018 · 9 comments

Comments

@asmodehn
Copy link

$ pip install tox tox-travis
Collecting tox
  Downloading https://files.pythonhosted.org/packages/e6/41/4dcfd713282bf3213b0384320fa8841e4db032ddcb80bc08a540159d42a8/tox-3.0.0-py2.py3-none-any.whl (60kB)
    100% |████████████████████████████████| 61kB 4.9MB/s 
Collecting tox-travis
  Downloading https://files.pythonhosted.org/packages/a0/f0/55a0d561161ceac9da512d221547cd0405f0cbf5dfba7352cd36d7bfdace/tox_travis-0.10-py2.py3-none-any.whl
Requirement already satisfied: pluggy<1.0,>=0.3.0 in /home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages (from tox)
Requirement already satisfied: six in /home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages (from tox)
Collecting virtualenv>=1.11.2 (from tox)
  Downloading https://files.pythonhosted.org/packages/ed/ea/e20b5cbebf45d3096e8138ab74eda139595d827677f38e9dd543e6015bdf/virtualenv-15.2.0-py2.py3-none-any.whl (2.6MB)
    100% |████████████████████████████████| 2.6MB 487kB/s 
Requirement already satisfied: py>=1.4.17 in /home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages (from tox)
Installing collected packages: virtualenv, tox, tox-travis
Successfully installed tox-3.0.0 tox-travis-0.10 virtualenv-15.2.0
0.34s$ tox
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.14/bin/tox", line 11, in <module>
    sys.exit(run_main())
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox/session.py", line 40, in run_main
    main(args)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox/session.py", line 45, in main
    config = prepare(args)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox/session.py", line 27, in prepare
    config = parseconfig(args)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox/config.py", line 278, in parseconfig
    pm.hook.tox_configure(config=config)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pluggy/__init__.py", line 617, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pluggy/__init__.py", line 222, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pluggy/__init__.py", line 216, in <lambda>
    firstresult=hook.spec_opts.get('firstresult'),
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pluggy/callers.py", line 201, in _multicall
    return outcome.get_result()
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pluggy/callers.py", line 77, in get_result
    _reraise(*ex)  # noqa
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pluggy/callers.py", line 180, in _multicall
    res = hook_impl.function(*args)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox_travis/hooks.py", line 40, in tox_configure
    envlist = detect_envlist(ini)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox_travis/envlist.py", line 18, in detect_envlist
    desired_factors = get_desired_factors(ini)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox_travis/envlist.py", line 183, in get_desired_factors
    for name, value in ini.sections.get('travis:env', {}).items()
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox_travis/utils.py", line 32, in parse_dict
    return dict((k.strip(), v.strip()) for k, v in pairs)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox_travis/utils.py", line 32, in <genexpr>
    return dict((k.strip(), v.strip()) for k, v in pairs)
ValueError: need more than 1 value to unpack

from https://travis-ci.org/asmodehn/rostful/jobs/367548379/config

@asmodehn
Copy link
Author

Just noticed tox moved to 3.0.0
Is this related ?

@obestwalter
Copy link
Member

Just noticed tox moved to 3.0.0
Is this related ?

I would not rule it out. Can you pin tox to 2.9.1 and check of the error persists? Thanks!

@asmodehn
Copy link
Author

@asmodehn
Copy link
Author

I may have found the culprit . I had

[travis:env]
ROS_DISTRO = kinetic, indigo, latest

in https://github.com/asmodehn/rostful/blob/6839b8820e88992257ee9cfe21c63aa16d71882b/tox.ini#L36

After changing it like this, travis
build started to work again : https://travis-ci.org/asmodehn/rostful/jobs/368125473

@obestwalter
Copy link
Member

Thanks. To clarify: it had nothing to with the 3.0 reease then?

or did that:

ROS_DISTRO = kinetic, indigo, latest

work pre 3.0 and stopped working?

@asmodehn
Copy link
Author

I reverted to use latest tox, and everything went fine, so it's not related to tox 3.0

I have been playing with my tox configuration recently, so I am ready to bet that

[travis:env]
ROS_DISTRO = kinetic, indigo, latest

never worked as I thought it would.
Not sure if it would be a good or a bad idea to get it to mean :

[travis:env]
ROS_DISTRO =
  kinetic: kinetic
  indigo: indigo
  latest: latest

@obestwalter
Copy link
Member

Not sure if it would be a good or a bad idea to get it to mean :

From where I stand at the moment definitely a bad idea, because the tox.ini parser is already quite involved :)

@ryanhiebert
Copy link
Collaborator

I'm also leery of doing that. All three positions (in this case ROS_DISTRO, kenetic, and kenetic) mean something different, and I think the magic you're suggesting would make that more confusing. The three meanings are "env var name", "env var value", and "envs that should run when the value matches".

@asmodehn
Copy link
Author

Alright then, feel free to close this issue.
No problem on my side, I just didn't follow the docs carefully enough :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants