astrofrog / pyavm

Pure-python AVM library
http://astrofrog.github.io/pyavm/
Other
20 stars 9 forks source link

python3: xml writing seems to require Bytes, not String #31

Closed keflavich closed 6 years ago

keflavich commented 8 years ago

All in the title. I haven't tested on py2, but it definitely didn't work on py3.

Is it OK to have astropy as a requirement? It simplifies the import.

saimn commented 7 years ago

I have a similar issue while trying to save a jpg file with aplpy: https://gist.github.com/saimn/c4d5865e590be2ab348cbc31f30d3005 (note the line with StringIO() which is modified by this PR). I can try to look more in detail, but probably not in the next weeks.

astrofrog commented 6 years ago

@keflavich - could you rebase this and add a regression test? I'd rather not add a required astropy dependency if possible, so can you import BytesIO from io as mentioned above?

astrofrog commented 6 years ago

I finished this up in https://github.com/astrofrog/pyavm/pull/33 - thanks!