# Buggy code
def push_record(record):
    for _spec in record.combined_depends:
        push_spec(_spec)
    if record.track_features:
        for ftr_name in record.track_features:
            push_spec(MatchSpec(track_features=ftr_name))


# Traceback (conda.exceptions.CondaValueError)
$ conda --version
conda 4.4.7
$ conda install -vvv numpy
DEBUG conda.gateways.logging:set_verbosity(148): verbosity set to 3
Solving environment: ...working... DEBUG conda.core.solve:solve_final_state(140): solving prefix /scratch/mc3
specs_to_remove: frozenset()
specs_to_add: frozenset({MatchSpec(name=LowerStrMatch('numpy'))})
prune: False
TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/appnope-0.1.0-py36hf537a9a_0.json
TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/asn1crypto-0.23.0-py36h782d450_0.json
TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/bleach-2.1.1-py36h27c13d8_0.json
[...]
TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/zeromq-4.2.2-ha360ad0_2.json
TRACE conda.core.linked_data:_load_single_record(113): loading prefix record /scratch/mc3/conda-meta/zlib-1.2.11-hf3cbc9b_2.json
failed
Traceback (most recent call last):
File "/scratch/mc3/lib/python3.6/site-packages/conda/exceptions.py", line 743, in __call__
return func(*args, **kwargs)
File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/main.py", line 78, in _main
exit_code = do_call(args, p)
File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 76, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/main_install.py", line 11, in execute
install(args, parser, 'install')
File "/scratch/mc3/lib/python3.6/site-packages/conda/cli/install.py", line 236, in install
force_reinstall=context.force,
File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 504, in solve_for_transaction
force_remove, force_reinstall)
File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 437, in solve_for_diff
final_precs = self.solve_final_state(deps_modifier, prune, ignore_pinned, force_remove)
File "/scratch/mc3/lib/python3.6/site-packages/conda/core/solve.py", line 146, in solve_final_state
specs_from_history_map = History(self.prefix).get_requested_specs_map()
File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 187, in get_requested_specs_map
spec_map.update(((s.name, s) for s in update_specs))
File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 187, in <genexpr>
spec_map.update(((s.name, s) for s in update_specs))
File "/scratch/mc3/lib/python3.6/site-packages/conda/history.py", line 186, in <genexpr>
update_specs = (MatchSpec(spec) for spec in request.get('update_specs', ()))
File "/scratch/mc3/lib/python3.6/site-packages/conda/models/match_spec.py", line 39, in __call__
parsed = _parse_spec_str(spec_arg)
File "/scratch/mc3/lib/python3.6/site-packages/conda/models/match_spec.py", line 556, in _parse_spec_str
raise CondaValueError("Invalid MatchSpec: %s" % spec_str)
conda.exceptions.CondaValueError: Invalid MatchSpec: <2.0

# Fixed code
def push_record(record):
    push_spec(MatchSpec(record.name))
    for _spec in record.combined_depends:
        push_spec(_spec)
    if record.track_features:
        for ftr_name in record.track_features:
            push_spec(MatchSpec(track_features=ftr_name))