pyyaml 3.10 can't dump dict

Issue #6 new
Christos Georgiou
created an issue
>>> import datetime, yaml
>>> yaml.dump({ 1, None: 2})
Traceback (most recent call last):
  File "<pyshell#67>", line 1, in <module>
    yaml.dump({ 1, None: 2})
  File "/usr/lib/python2.7/dist-packages/yaml/", line 202, in dump
    return dump_all([data], stream, Dumper=Dumper, **kwds)
  File "/usr/lib/python2.7/dist-packages/yaml/", line 190, in dump_all
  File "/usr/lib/python2.7/dist-packages/yaml/", line 28, in represent
    node = self.represent_data(data)
  File "/usr/lib/python2.7/dist-packages/yaml/", line 57, in represent_data
    node = self.yaml_representers[data_types[0]](self, data)
  File "/usr/lib/python2.7/dist-packages/yaml/", line 223, in represent_dict
    return self.represent_mapping(u',2002:map', data)
  File "/usr/lib/python2.7/dist-packages/yaml/", line 120, in represent_mapping
TypeError: can't compare to NoneType

Comments (1)

  1. Log in to comment