Are You Using Google's sitemap_gen? Don't.
If you are using Google's sitemap_gen to generate a sitemap for your site... don't.
It's python 2.x only
The code is ghastly
The output it produces is trivial
For example, I just replaced it with ~30 lines of nicer code. and probably so can you.