[C++-sig] Py++ question

Robert O'Callahan ropoctl at gmail.com
Tue Oct 2 18:26:33 CEST 2007

I am trying to use a generate_code.py created by the py++ gui, but I
get this error:

Traceback (most recent call last):
  File "generate_code.py", line 40, in ?
  File "generate_code.py", line 37, in export
    mb.write_module( os.path.join( settings.generated_files_dir,
settings.module_name + '.cpp') )
  File "/usr/lib/python2.4/site-packages/pyplusplus/module_builder/builder.py",
line 311, in write_module
    file_writers.write_file( self.code_creator, file_name,
encoding=self.encoding )
  File "/usr/lib/python2.4/site-packages/pyplusplus/file_writers/__init__.py",
line 40, in write_file
  File "/usr/lib/python2.4/site-packages/pyplusplus/file_writers/single_file.py",
line 27, in write
    self.write_file( self.file_name, self.extmodule.create(),
encoding=self.encoding )
  File "/usr/lib/python2.4/site-packages/pyplusplus/file_writers/writer.py",
line 124, in write_file
    f.write( unicode( fcontent_new, encoding ) )
TypeError: decoding Unicode is not supported

Should I be writing the code generator from scratch?


More information about the Cplusplus-sig mailing list