Thread: [pygccxml-development] KeyError in Py++
Brought to you by:
mbaas,
roman_yakovenko
From: Sergey . <sr...@gm...> - 2009-01-24 14:35:48
|
Dear Py++ developers, I am using Pygccxml and Py++ to generate Python bindings for our C++ project and really like it. You guys are doing a great job, thank you for you work! After upgrading to version 1.0.0 I started to occasionally receive the following error when trying to execute module_builder_t (see log below). Strange thing is that it appears only with certain combination of headers files, when each of them separately could be bound without a problem. Also, trying to compile with older version of gcc (3.4.6) tends to produce this error for almost any combination of header files. Any idea what could be wrong with my setup or my code? Thank you in advance, Sergey. File "/Users/.../lib/python2.5/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 88, in __init__ , indexing_suite_version) File "/Users/.../lib/python2.5/site-packages/pyplusplus/module_builder/boost_python_builder.py", line 130, in __parse_declarations decls = reader.read_files( files, compilation_mode ) File "/Users/.../lib/python2.5/site-packages/pygccxml/parser/project_reader.py", line 225, in read_files return self.__parse_file_by_file(files) File "/Users/.../lib/python2.5/site-packages/pygccxml/parser/project_reader.py", line 280, in __parse_file_by_file leaved_classes = self._join_class_hierarchy( answer ) File "/Users/.../lib/python2.5/site-packages/pygccxml/parser/project_reader.py", line 413, in _join_class_hierarchy leaved_base = leaved_classes[ create_key( base_info.related_class ) ] KeyError: (('/usr/include/c++/4.0.0/bits/stringfwd.h', 49), ('::', 'std', 'allocator<char>')) |
From: Roman Y. <rom...@gm...> - 2009-01-25 06:27:16
|
On Sat, Jan 24, 2009 at 4:35 PM, Sergey . <sr...@gm...> wrote: > Dear Py++ developers, > > I am using Pygccxml and Py++ to generate Python bindings for our C++ > project and really like it. You guys are doing a great job, thank you for > you work! Thank you! > After upgrading to version 1.0.0 I started to occasionally receive the > following error when trying to execute module_builder_t (see log below). > Strange thing is that it appears only with certain combination of headers > files, when each of them separately could be bound without a problem. Also, > trying to compile with older version of gcc (3.4.6) tends to produce this > error for almost any combination of header files. Any idea what could be > wrong with my setup or my code? I guess nothing, but to be sure I need to see how you construct module_builder_t class instance. Do you pass single file a list of files? My guess - you pass list of files. I suggest you to create a header file, which includes all others and pass it to module_builder_t.__init__. This should fix your problem. If it does, it could be nice if you can send me (privately) gccxml generated files for every file, you pass to module_builder_t and than xml file of the file, which includes all. I think this will help me to find and fix the bug. Thanks -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |
From: Sergey . <sr...@gm...> - 2009-01-25 14:24:24
|
On Sun, Jan 25, 2009 at 1:27 AM, Roman Yakovenko <rom...@gm...>wrote: > I guess nothing, but to be sure I need to see how you construct > module_builder_t class instance. > Do you pass single file a list of files? My guess - you pass list of files. - Yes, this is correct, I pass list of files. > I suggest you to create a header file, which includes all others and > pass it to module_builder_t.__init__. This should fix your problem. - Good idea, I will try that soon. I will let you know how it goes. I will have to contact my boss before I can send you any files, but I guess this should be OK. Thank you for your help! Sergey. On Sun, Jan 25, 2009 at 1:27 AM, Roman Yakovenko <rom...@gm...>wrote: > On Sat, Jan 24, 2009 at 4:35 PM, Sergey . <sr...@gm...> wrote: > > Dear Py++ developers, > > > > I am using Pygccxml and Py++ to generate Python bindings for our C++ > > project and really like it. You guys are doing a great job, thank you for > > you work! > > Thank you! > > > After upgrading to version 1.0.0 I started to occasionally receive the > > following error when trying to execute module_builder_t (see log below). > > Strange thing is that it appears only with certain combination of headers > > files, when each of them separately could be bound without a problem. > Also, > > trying to compile with older version of gcc (3.4.6) tends to produce this > > error for almost any combination of header files. Any idea what could be > > wrong with my setup or my code? > > I guess nothing, but to be sure I need to see how you construct > module_builder_t class instance. > Do you pass single file a list of files? My guess - you pass list of files. > I suggest you to create a header file, which includes all others and > pass it to module_builder_t.__init__. This should fix your problem. > > If it does, it could be nice if you can send me (privately) gccxml > generated files for every file, you pass to module_builder_t and than > xml file of the file, which includes all. > I think this will help me to find and fix the bug. > > Thanks > > -- > Roman Yakovenko > C++ Python language binding > http://www.language-binding.net/ > |
From: Roman Y. <rom...@gm...> - 2009-01-25 19:14:53
|
On Sun, Jan 25, 2009 at 4:24 PM, Sergey . <sr...@gm...> wrote: > On Sun, Jan 25, 2009 at 1:27 AM, Roman Yakovenko <rom...@gm...> > wrote: >> I guess nothing, but to be sure I need to see how you construct >> module_builder_t class instance. >> Do you pass single file a list of files? My guess - you pass list of >> files. > - Yes, this is correct, I pass list of files. > >> I suggest you to create a header file, which includes all others and >> pass it to module_builder_t.__init__. This should fix your problem. > - Good idea, I will try that soon. I will let you know how it goes. I > will have to contact my boss before I can send you any files, but I guess > this should be OK. I don't need your code, but a code that reproduce the problem. It could be nice, if you can send very simple code. > Thank you for your help! You are welcome. -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |