-2

I was trying to use auto-summary through sphinx in python I have one file named widgets.py in which I'm importing all the widgets I created using QT.

The issue is that I'm getting below error.

/{}/{}/{}/{}/{}/{}/{}/{}/{}/{}/sphinx/src/reference.rst:7: WARNING: failed to import widgets

but widgets.py is present there

but if I comment out the Qt imports it will start working.

mzjn
  • 45,711
  • 11
  • 120
  • 232
  • Is \_\_init\_\_.py in the the same folder as your widgets.py file? https://stackoverflow.com/questions/448271/what-is-init-py-for – FlippinBits May 19 '22 at 04:32
  • Yes it have __init__ file – vivek dixit May 19 '22 at 04:44
  • Hi __For reproducing__ you can simply create a widget using Qt and docstring all other auto-summary then try to build a sphinx document it will show an error – vivek dixit May 19 '22 at 04:47
  • Hey there, please follow the guidelines in https://stackoverflow.com/help/how-to-ask in order to ask a good question. You should provide a minimal reproducible example in order for us to help you with your issue – DPM May 19 '22 at 08:41
  • Please provide enough code so others can better understand or reproduce the problem. – Community May 19 '22 at 08:41
  • Sure Keep in mind for next time I got the error it is happening because of some other imports which are not present in the environment now its working fine thank you guys – vivek dixit May 19 '22 at 09:46

0 Answers0