bind_map
generates KeysView
, ItemsView
& ListView
, which causes Sphinx to crash
#5458
Unanswered
TomSchammo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a
std::map<std::uint8_t, std::map<std::string, std::vector<float>>>
full with values that I process using C++ and then expose in Python like this:This works fine but
bind_map
generatesItemsView[int, Dict[str, List[float]]]
,KeysView[int]
&ValuesView[Dict[str, List[float]]]
(as types that can then be returned by functions such askeys()
. When I then try to generate documentation using sphinx, sphinx tries to import those views and crashes withAttributeError
s.Now my understanding is that Sphinx is not supposed to try and import those, but it does it anyways because they are listed in
dir(mymodule.submodule)
. (Though I'm not sure why exactly you can't import them if they are there, so that's something else I'm wondering about.)Does anyone know how best to fix this?
Beta Was this translation helpful? Give feedback.
All reactions