Pelagicore / gdbus-codegen-glibmm

Code generator for C++ D-Bus stubs and proxies using Giomm/Glibmm
GNU Lesser General Public License v2.1
23 stars 25 forks source link

Generating with single close xml tags #77

Open mixxer opened 5 years ago

mixxer commented 5 years ago

https://pastebin.com/7Qa6DQEX

I got a problem with a single closing tag. " \<node name="bluetooth"/> "

mardy commented 5 years ago

Hi! I just tried, and it seems to be working fine here. What error do you get, exactly?

mixxer commented 5 years ago

Hi, mardy

The following error message occurred;;

gdbus-codegen-glibmm3 --generate-cpp-code=dbus-ofono org.ofono.xml

Traceback

(most recent call last): File "/usr/local/bin/gdbus-codegen-glibmm3", line 11, in load_entry_point('gdbus-codegen.glibmm==2.99.0', 'console_scripts', 'gdbus-codegen-glibmm3')() File "/usr/local/lib/python3.6/dist-packages/gdbus_codegen.glibmm-2.99.0-py3.6.egg/codegen_glibmm/codegen_main.py", line 82, in codegen_main parsed_ifaces = parser.parse_dbus_xml(xml_data) File "/usr/local/lib/python3.6/dist-packages/gdbus_codegen.glibmm-2.99.0-py3.6.egg/codegen_glibmm/parser.py", line 223, in parse_dbus_xml parser = DBusXMLParser(xml_data) File "/usr/local/lib/python3.6/dist-packages/gdbus_codegen.glibmm-2.99.0-py3.6.egg/codegen_glibmm/parser.py", line 55, in init self._parser.Parse(xml_data) File "../Modules/pyexpat.c", line 414, in StartElement File "/usr/local/lib/python3.6/dist-packages/gdbus_codegen.glibmm-2.99.0-py3.6.egg/codegen_glibmm/parser.py", line 109, in handle_start_element self._cur_object.doc_string = self._last_comment AttributeError: 'NoneType' object has no attribute 'doc_string'

As mentioned earlier, after I remove a single close tag, the error is cleared....

Thank you and Best Regards.

mardy commented 5 years ago

Thanks! Could you also share the org.ofono.xml file?