Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider enhancing doc #107

Open
oliviercailloux opened this issue Oct 3, 2024 · 1 comment
Open

Consider enhancing doc #107

oliviercailloux opened this issue Oct 3, 2024 · 1 comment
Assignees

Comments

@oliviercailloux
Copy link

oliviercailloux commented Oct 3, 2024

This project looks very useful (thank you!), but I couldn’t make it work.

pip install dbus-python-client-gen was successful, then import dbus_python_client_gen (I guessed that one), but then

dbus_python_client_gen.make_class('Klass', 'DisplayConfig.xml') 

(with the xml file downloaded from here) says:

File "…/lib/python3.11/site-packages/dbus_python_client_gen/_invokers.py", line 412, in make_class
    interface_name = spec.attrib["name"]
AttributeError: 'str' object has no attribute 'attrib'

I cannot find what kind of object is expected for spec.

I tried import xml.etree.ElementTree as ET then spec = ET.parse('DisplayConfig.xml'), and alternatively spec = ET.parse('DisplayConfig.xml').getroot(), to no avail.

@mulkieran
Copy link
Member

mulkieran commented Oct 3, 2024

@oliviercailloux Thanks! Look at stratis-cli for a usage example: https://github.com/stratis-storage/stratis-cli . Especially https://github.com/stratis-storage/stratis-cli/blob/master/src/stratis_cli/_actions/_introspect.py, and https://github.com/stratis-storage/stratis-cli/blob/master/src/stratis_cli/_actions/_data.py.

Also, constructive criticism generally is definitely welcome. This project has been in regular use but not under regular development for a while...

@mulkieran mulkieran self-assigned this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants