htm match expects ascii names for matchfile; fails silently for unicode names
GoogleCodeExporter opened this issue · comments
Google Code Exporter commented
What steps will reproduce the problem?
matchfile = u'filename'
h = eu.htm.HTM(8)
h.match(lenses['RA'], lenses['DEC'], shapes[config['shape_ra_key']],
shapes[config['shape_dec_key']], maxrange, maxmatch=-1, file=matchfile)
What is the expected output? What do you see instead?
No matchfile is created, no error/warning message is throw. Unicode names are
returned by some of python filesystem function, in this case glob, which cause
the code to fail working properly.
What version of the product are you using? On what operating system?
esutil 0.5.1 on Linux with python 2.7.3
Original issue reported on code.google.com by peter.m....@gmail.com
on 6 Dec 2014 at 6:39
Google Code Exporter commented
Yes, this is because I'm checking for a python string in the c++ code. I need
to do something smarter.
Original comment by erin.sheldon@gmail.com
on 6 Dec 2014 at 8:35
Google Code Exporter commented
It doesn't have to be much smarter, but a warning message would help.
Original comment by peter.m....@gmail.com
on 6 Dec 2014 at 8:47
Google Code Exporter commented
in the mean time you can call the code with str(filename) and it should work.
Original comment by erin.sheldon@gmail.com
on 6 Dec 2014 at 8:47
Google Code Exporter commented
In the trunk I've added a warning, and converted unicode to string.
In the longer term, need to deal properly with wide chars at the C++ level
Original comment by erin.sheldon@gmail.com
on 9 Dec 2014 at 8:30