1

Now on writing path as sys.path.insert(0,'/home/pooja/Desktop/mysite'), it ran fine asked me for the word tobe searched and gave this error:

Traceback (most recent call last):

File "call.py", line 32, in

s.save()

File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py", line 463, in save

self.save_base(using=using, force_insert=force_insert, force_update=force_update)

File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py", line 524, in

save_base

manager.using(using).filter(pk=pk_val).exists())):

File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 562, in exists

return self.query.has_results(using=self.db)

File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 441, in has_results

return bool(compiler.execute_sql(SINGLE))

File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py", line 818, in execute_sql

cursor.execute(sql, params)

File "/usr/local/lib/python2.6/dist-packages/django/db/backends/util.py", line 40, in execute

return self.cursor.execute(sql, params) File "/usr/local/lib/python2.6/dist-packages/django/db/backends/sqlite3/base.py", line 337, in execute return Database.Cursor.execute(self, query, params)

django.db.utils.DatabaseError: no such table: search_keywords

Please help!!

1
  • Did you run command syncdb or migrate the code? Commented Jul 3, 2012 at 9:22

1 Answer 1

1

The exception says: no such table: search_keywords, which is quite self-explanatory and means that there is no database table with such name. So:

  1. You may be using relative path to db file in settings.py, which resolves to a different db depending on place where you execute the script. Try to use absolute path and see if it helps.

  2. You have not synced your models with the database. Run manage.py syncdb to generate the database tables.

Sign up to request clarification or add additional context in comments.

1 Comment

you were right. But I did create the tables before . I don't what happened why was'nt it accepting that one. Now I again I did all those steps , and it's working. Thanks , anyway :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.