loganasherjones / yapconf

Yet Another Python Configuration
http://yapconf.readthedocs.io/en/stable/
MIT License
18 stars 4 forks source link

Python 2 Str / Unicode #37

Closed hazmat345 closed 6 years ago

hazmat345 commented 6 years ago

Ran into this bug trying to run a migration:

  File "/opt/beer-garden/lib/python2.7/site-packages/yapconf/spec.py", line 276, in migrate_config_file
    output_file_type)
  File "/opt/beer-garden/lib/python2.7/site-packages/yapconf/spec.py", line 377, in _write_dict_to_file
    json.dump(dictionary, conf_file, sort_keys=True, indent=4)
  File "/opt/beer-garden/lib/python2.7/json/__init__.py", line 190, in dump
    fp.write(chunk)
TypeError: write() argument 1 must be unicode, not str
loganasherjones commented 6 years ago

This bug is fixed in 0.2.3. Opening a new issue for true unicode support as config values. Not sure about keys.