I want to use pychecker to do static analysis on my code. So I set up
DJAGO_SETTINGS_MODULE and run pychecker from shell. I am getting
exceptions like,

G:\prajact>pychecker project\urls.py

G:\prajact>C:\Python24\python.exe C:\Python24\Lib\site-packages
\pychecker\checker.py project\urls.py
Processing urls...
  Caught exception importing module urls:
    File "C:\Python24\Lib\site-packages\pychecker\checker.py", line
621, in setupMainCode()
      module = imp.load_module(self.moduleName, file, filename, smt)
    File "G:\prajact\..\prajact\project\urls.py", line 4
      from rss import *
    File "G:\prajact\..\prajact\project\rss.py", line 4
      from helpers import *
    File "G:\prajact\..\prajact\project\helpers.py", line 8
      from models import *
    File "G:\prajact\project\models.py", line 41
      class Project(models.Model):
    File "C:\Python24\lib\site-packages\django\db\models\base.py",
line 53, in __new__()
      new_class._meta.app_label = model_module.__name__.split('.')[-2]
  IndexError: list index out of range

Warnings...

urls:1: NOT PROCESSED UNABLE TO IMPORT

The checker runs fine on non Django code. It seems that some of the
model metaclass magic clashes with pychecker.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to