Skip to content

Mech init TypeError: unorderable types: NoneType() < str()` #61

@network-shark

Description

@network-shark

I'm trying to import a freebsd box, but this results in the following error.

╰─ mech init https://app.vagrantup.com/roboxes/boxes/freebsd11
Initializing mech
Traceback (most recent call last):
File "/Users/sharky/.pyenv/versions/ansible/bin/mech", line 11, in
load_entry_point('mech==0.7.6', 'console_scripts', 'mech')()
File "/Users/sharky/.pyenv/versions/3.5.7/envs/ansible/lib/python3.5/site-packages/mech/main.py", line 39, in main
return Mech(arguments)()
File "/Users/sharky/.pyenv/versions/3.5.7/envs/ansible/lib/python3.5/site-packages/mech/command.py", line 89, in call
obj = klass(arguments)
File "/Users/sharky/.pyenv/versions/3.5.7/envs/ansible/lib/python3.5/site-packages/mech/mech.py", line 569, in init
if utils.init_mechfile(instance_name, url, name=name, version=version, requests_kwargs=requests_kwargs):
File "/Users/sharky/.pyenv/versions/3.5.7/envs/ansible/lib/python3.5/site-packages/mech/utils.py", line 474, in init_mechfile
path = index_active_instance(instance_name)
File "/Users/sharky/.pyenv/versions/3.5.7/envs/ansible/lib/python3.5/site-packages/mech/utils.py", line 463, in index_active_instance
'path': path,
File "/Users/sharky/.pyenv/versions/3.5.7/envs/ansible/lib/python3.5/site-packages/mech/utils.py", line 222, in settle_instance
json.dump(instances, fp, sort_keys=True, indent=2, separators=(',', ': '))
File "/Users/sharky/.pyenv/versions/3.5.7/lib/python3.5/json/init.py", line 178, in dump
for chunk in iterable:
File "/Users/sharky/.pyenv/versions/3.5.7/lib/python3.5/json/encoder.py", line 429, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/Users/sharky/.pyenv/versions/3.5.7/lib/python3.5/json/encoder.py", line 352, in _iterencode_dict
items = sorted(dct.items(), key=lambda kv: kv[0])
TypeError: unorderable types: NoneType() < str()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions