AstunTechnology / mapserver-upgrade-config

MIT License
0 stars 2 forks source link

map_to_xml fails to output to file but does output to stdout #14

Closed archaeogeek closed 5 years ago

archaeogeek commented 5 years ago

If you use map-to-xml with the -o parameter then it fails with the following error:

(mapserver-upgrade-config) E:\iShareData\LIVE\_MapServerConfig>D:\Astun\Tools\ma
pserver-upgrade-config\Scripts\map-to-xml.exe corporate.map -o xml\corporate.xml

Processing corporate.map
Traceback (most recent call last):
  File "D:\Astun\Tools\mapserver-upgrade-config\Scripts\map-to-xml-script.py", l
ine 11, in <module>
    load_entry_point('mapfile-utils==1.0.2', 'console_scripts', 'map-to-xml')()
  File "d:\astun\tools\mapserver-upgrade-config\maputils\map_to_xml.py", line 38
9, in main
    mapper.print_map()
  File "d:\astun\tools\mapserver-upgrade-config\maputils\map_to_xml.py", line 37
1, in print_map
    print(etree.tostring(self.map_root, pretty_print=True))
TypeError: must be unicode, not str

However if you redirect stdout to a file instead then it works just fine

ianturton commented 5 years ago

fixed in 1.1.0