[C++-sig] Py++ question

Roman Yakovenko roman.yakovenko at gmail.com
Tue Oct 2 20:52:49 CEST 2007


On 10/2/07, Robert O'Callahan <ropoctl at gmail.com> wrote:
>
> 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 ?
>     export()
>   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
>     sf.write()
>   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?



What version of Py++ do you use?  I fixed such error few weeks or month ago.

Can you try SVN version?

P.S. You will have to get SVN version of pygccxml too, but you can stay with
your current version of GCC-XML

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20071002/a5fd0972/attachment.htm>


More information about the Cplusplus-sig mailing list