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

TypeError: No Python class registered for C++ class #232

Open
lenard-mosys opened this issue Oct 18, 2024 · 0 comments · May be fixed by #233
Open

TypeError: No Python class registered for C++ class #232

lenard-mosys opened this issue Oct 18, 2024 · 0 comments · May be fixed by #233

Comments

@lenard-mosys
Copy link

I'm trying pybind-stubgen on libtorrent, which apparently uses Boost::python.

$ pybind11-stubgen --ignore-all-errors libtorrent
Traceback (most recent call last):
  File "/home/lenard/git/torrent/venv/bin/pybind11-stubgen", line 8, in <module>
    sys.exit(main())
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/__init__.py", line 319, in main
    run(
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/__init__.py", line 357, in run
    module = parser.handle_module(
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/error_handlers.py", line 45, in handle_module
    return super().handle_module(path, module)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/fix.py", line 207, in handle_module
    result = super().handle_module(path, module)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/fix.py", line 223, in handle_module
    result = super().handle_module(path, module)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/fix.py", line 128, in handle_module
    result = super().handle_module(path, module)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/fix.py", line 451, in handle_module
    result = super().handle_module(path, module)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/parse.py", line 90, in handle_module
    obj = self.handle_module_member(
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/filter.py", line 119, in handle_module_member
    return super().handle_module_member(path, module, obj)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/filter.py", line 136, in handle_module_member
    result = super().handle_module_member(path, module, obj)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/parse.py", line 133, in handle_module_member
    return self.handle_class(path, member)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/error_handlers.py", line 49, in handle_class
    return super().handle_class(path, class_)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/fix.py", line 110, in handle_class
    result = super().handle_class(path, class_)
  File "/home/lenard/git/torrent/venv/lib/python3.10/site-packages/pybind11_stubgen/parser/mixins/parse.py", line 48, in handle_class
    for name, member in inspect.getmembers(class_):
  File "/usr/lib/python3.10/inspect.py", line 469, in getmembers
    value = getattr(object, key)
TypeError: No Python class registered for C++ class deprecate_visitor<int libtorrent::fingerprint::*>

version: 2.5.1
libtorrent version: 2.0.9

I would expect --ignore-all-errors to pass.

@lenard-mosys lenard-mosys linked a pull request Oct 18, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant