Sunday, 16 April 2023

"module has no attribute" in Python C module

I am trying to build this old project but ./setup.py build shows this warning (not sure if related, could be normal):

WARNING: the following files are not recognized by DistUtilsExtra.auto: 
<the list of .c/.h files in Onboard/osk/>

and when I run ./onboard

Traceback (most recent call last):
  File "/home/....../onboard/./onboard", line 35, in <module>
    from Onboard.OnboardGtk import OnboardGtk as Onboard
  File "/home/....../onboard/Onboard/OnboardGtk.py", line 48, in <module>
    from Onboard.Keyboard        import Keyboard
  File "/home/....../onboard/Onboard/Keyboard.py", line 45, in <module>
    from Onboard.KeyboardPopups        import TouchFeedback
  File "/home/....../onboard/Onboard/KeyboardPopups.py", line 256, in <module>
    class LabelPopup(KeyboardPopupDrawable):
  File "/home/....../onboard/Onboard/KeyboardPopups.py", line 264, in LabelPopup
    _osk_util = osk.Util()
AttributeError: module 'Onboard.osk' has no attribute 'Util'

any ideas why it happens? I have never worked with C modules in Python before.



from "module has no attribute" in Python C module

No comments:

Post a Comment