Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
and I also had to replace () with [] in the produced GeoJSON file to bypass another error caused using ogr2ogr.exe. Those may be changes in software or I'm missing something obvious! Anyway, with these two tricks it produced a DXF file successfully.
Just to mention in execution of the provided code an error come up: "write requires string/buffer". So I changed it as: write(str(mapping(buffer_obj))) and it is OK now. I use Python 2.72 BTW.