On Sun, Sep 1, 2019, 10:29 PM Rudi Hammad <rudiham...@gmail.com> wrote:

> Hello,
> I think this might be my pycharm configuration, but I am trying to run a
> UI both in maya and pycharm by doing:
>
> import sys
> from PySide2.QtWidgets import QApplication, QLabel
>
> if __name__ == "__main__":
>     app = QApplication(sys.argv)
>     label = QLabel("aight?")
>     label.show()
>     app.exec_()
> else:
>     label = QLabel("aight?")
>     label.show()
>
>
> When importing in maya ir works, but when testing it in pycharm I am
> getting the error:
> app = QtWidgets.QApplication(sys.argv)
> TypeError: 'NoneType' object is not callable
>
> I have googled for a couple of hours, but I don't find a solution.
> Thanks
>
> R
>

Your error doesn't exactly match the syntax of your code, but could it be
caused by PyCharm being set up to point at PySide2 stubs instead of the
actual PySide2 install? Not alot else to go on here. You should check the
source python paths you are using in your PyCharm python interpreter
configuration. And you could also print QtWidgets module after you import
it to confirm which location you are picking up.


-- 
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/573f78fd-f8e4-4979-bc70-0e86101d7ccf%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/573f78fd-f8e4-4979-bc70-0e86101d7ccf%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0DYzgfWrzAeKTzNZ7VwxA6EdtSKN%3DXbzuKC4VXXQpUfQ%40mail.gmail.com.

Reply via email to