Menu

#1481 Undefined variable from import: QPyNullVariant

pending
Editor (491)
5
2012-04-26
2012-03-03
Anonymous
No

Pydev 2.4.0 is complaining about :Undefined variable from import: QPyNullVariant:

Error exists in following line:
if isinstance(isAdmin, QtCore.QPyNullVariant):

Line with this error executes without any problem, so I assume that QPyNullVariant is defined in QtCore
I'm using Python 2.7 with PyQt 4.9.1

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2012-04-26

    On a quick test here (after installing the same version you pointed):

    >>> from PyQt4 import QtCore
    >>> QtCore.QPyNullVariant
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    AttributeError: 'module' object has no attribute 'QPyNullVariant'

    So, it seems it shouldn't really find that... unless there's something different there... are you sure that it's really executing that line of code? Can you check in the shell if QPyNullVariant is really found?

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2012-04-26
    • status: open --> pending