Hi all, I'm attempting to run pychecker on my django code (an application's models.py file) and get the following output:
$ pychecker models.py Processing models... Caught exception importing module models: File "/var/lib/python-support/python2.5/pychecker/checker.py", line 619, in setupMainCode() File "models.py", line 538, in <module>() File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 51, in __new__() IndexError: list index out of range Warnings... models:1: NOT PROCESSED UNABLE TO IMPORT My django version is '1.0.2 final'. The IndexError happens on the final line of code extract below: # Figure out the app_label by looking one level up. # For 'django.contrib.sites.models', this would be 'sites'. model_module = sys.modules[new_class.__module__] kwargs = {"app_label": model_module.__name__.split('.')[-2]} I added a 'print model_module.__name__' above this line and I get the following output before the exception: django.contrib.contenttypes.models django.contrib.auth.models django.contrib.auth.models django.contrib.auth.models django.contrib.auth.models models Not sure if the last models that triggers the exception is the models file I ran pychecker on or another file? I have all my django env variables set up correctly and can do runserver, dbshell ,etc. Any ideas as to why pychecker on my models file would throw this exception in the base django models file? thanks, ivan. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---