Forums

strange error I cant understand

look out please, what's wrong? on localhost its okay, but there's django 1.4.1

18:14 ~/rssDj/rssReader $ python2.7 rssReader.py > log
Traceback (most recent call last):
File "rssReader.py", line 20, in <module>
import models
File "/home/kernie_xvid/rssDj/rssDjApp/models.py", line 3, in <module>
class FreqWord(models.Model):
File "/usr/local/lib/python2.7/site-packages/Django-1.3.3-py2.7.egg/django/db/models/base.py", line 
52, in __new__
kwargs = {"app_label": model_module.__name__.split('.')[-2]}
IndexError: list index out of range

**models:**

from django.db import models

class FreqWord(models.Model):
    word = models.CharField(max_length=64)
    freq = models.IntegerField()
    wordId = models.CharField(max_length=64)
    checkDate = models.DateTimeField()

    def __unicode__(self):
        return self.word

class PrimaryData(models.Model):
    date = models.DateTimeField()
    title = models.TextField()
    text = models.TextField()
    url = models.TextField()

    def __unicode__(self):
        return self.title

class WordIds(models.Model):
    word = models.CharField(max_length=64)
    wordId = models.CharField(max_length=64)
    def __unicode__(self):
        return self.word

*rssReader ( script)***:

!/usr/bin/env python
# -*- coding: utf-8 -*-

import feedparser
import re
import datetime
import sys
import os

import re
import xlwt
import operator

import hashlib

sys.path.append('/home/kernie_xvid/')
sys.path.append('/home/kernie_xvid/rssDj')
sys.path.append('/home/kernie_xvid/rssDj/rssDjApp')
os.environ['DJANGO_SETTINGS_MODULE'] = 'rssDj.settings'
import models
from django.utils.timezone import *

################################################################################

class RssReader(object):
 ...........

oh, i found what's wrong; another question is how to delete this post

Actually, you just found a bug in our forums :-( It looks like it blows up when you edit a post and replace it with an empty one, which is, um, sub-optimal... If you want to get rid of your original post, it's probably best to just replace it with "[deleted]". And I'll file a bug...

Sorry about that!

Then soon it's the bug that can be [deleted]...☺

groans

well, let's hope so!