common-workflow-lab / python-cwlgen

Generation of CWL programmatically. Available types: CommandLineTool and DockerRequirement
https://github.com/common-workflow-language/cwl-utils
MIT License
29 stars 13 forks source link

'NoneType' object is not iterable when installing ruamel.yaml #20

Closed multimeric closed 5 years ago

multimeric commented 5 years ago

I'm getting this error when I try to install cwlgen, because the version of ruamel.yaml it depends on seems to be broken. Would you mind bumping up (or down) the ruamel.yaml version to fix this?

$ pip install cwlgen                                                
Collecting cwlgen
  Using cached https://files.pythonhosted.org/packages/77/68/4cba40b7815cd5ee6ab8fb41940d61c1d1bf967bf4ba42a5a028d5253d7f/cwlgen-0.2.8.tar.gz
Requirement already satisfied: six in ./venv/lib/python3.7/site-packages (from cwlgen) (1.12.0)
Collecting ruamel.yaml==0.13.13 (from cwlgen)
  Using cached https://files.pythonhosted.org/packages/d9/2d/f1773b60c7a78a832f6068761167907302927cb6c7279275a0dcee102e05/ruamel.yaml-0.13.13.tar.gz
    Complete output from command python setup.py egg_info:
    /tmp/tmp_ruamel_zpu9b6h_/test_ruamel_yaml.c: In function ‘main’:
    /tmp/tmp_ruamel_zpu9b6h_/test_ruamel_yaml.c:6:8: warning: ‘parser’ is used uninitialized in this function [-Wuninitialized]
     parser = parser;  /* prevent warning */
     ~~~~~~~^~~~~~~~
    Warning: 'keywords' should be a list, got type 'NoneType'
    sys.argv ['-c', 'egg_info', '--egg-base', 'pip-egg-info']
    test compiling test_ruamel_yaml
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-6sxhvhqp/ruamel.yaml/setup.py", line 854, in <module>
        main()
      File "/tmp/pip-install-6sxhvhqp/ruamel.yaml/setup.py", line 843, in main
        setup(**kw)
      File "/home/michael/Programming/CliHelpParser/venv/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.7/distutils/core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/michael/Programming/CliHelpParser/venv/lib/python3.7/site-packages/setuptools/dist.py", line 447, in __init__
        k: v for k, v in attrs.items()
      File "/usr/lib/python3.7/distutils/dist.py", line 267, in __init__
        getattr(self.metadata, "set_" + key)(val)
      File "/usr/lib/python3.7/distutils/dist.py", line 1203, in set_keywords
        self.keywords = _ensure_list(value, 'keywords')
      File "/usr/lib/python3.7/distutils/dist.py", line 40, in _ensure_list
        value = list(value)
    TypeError: 'NoneType' object is not iterable

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-6sxhvhqp/ruamel.yaml/
multimeric commented 5 years ago

I think this bug only happens for Python 3.7. It's documented on the ruamel.yaml BitBucket here: https://bitbucket.org/ruamel/yaml/issues/207/0412-fails-to-install-with-python-37

multimeric commented 5 years ago

Oops, seems this is a duplicate of #19