Tag library not found

311 views
Skip to first unread message

tomass

unread,
Oct 19, 2005, 5:36:58 PM10/19/05
to Django users
Hi Folks,

Getting this strange error message on my admin login.

File
"/usr/lib/python2.4/site-packages/django/core/template/defaulttags.py",
line 627, in do_load
raise TemplateSyntaxError, "'%s' is not a valid tag library" %
taglib

TemplateSyntaxError: 'auth.log' is not a valid tag library


If I go to the login page for the admin console it comes up fine, as
does any non-admin page, but when I'm logged in I get this error. I did
a grep for auth.log and it seems to be loaded in the index.html
template of the admin pages.

Should mention that I've just upgraded to the latest version.

Thanks, Tom

Adrian Holovaty

unread,
Oct 19, 2005, 5:56:42 PM10/19/05
to django...@googlegroups.com
On 10/19/05, tomass <tom.h...@gmail.com> wrote:
> TemplateSyntaxError: 'auth.log' is not a valid tag library
> [...]
> Should mention that I've just upgraded to the latest version.

Delete django/templatetags/*.pyc and django/templatetags/*.pyo, and
let us know if it fixes the problem.

Adrian

--
Adrian Holovaty
holovaty.com | djangoproject.com | chicagocrime.org

tomass

unread,
Oct 20, 2005, 5:58:14 AM10/20/05
to Django users
Works a treat, thanks!

Wonder if you've had a chance to take a look at this:
http://code.djangoproject.com/ticket/480#preview

Still seems to be bothering me...

Thanks, Tom

Dan Lipsitt

unread,
Oct 22, 2005, 10:55:38 PM10/22/05
to Django users
I am getting an error similar to Tom's after I login to admin:

=============
File
"/usr/lib/python2.4/site-packages/django-1.0.0-py2.4.egg/django/core/template/defaulttags.py",
line 627, in do_load
raise TemplateSyntaxError, "'%s' is not a valid tag library" %
taglib

TemplateSyntaxError: 'log' is not a valid tag library
=============

I just upgraded to rev 992. I deleted the old egg first, and I also
tried removing the .pyc files as Adrian described (there were no
.pyos).

Thanks,
Dan

Jeremy Dunck

unread,
Oct 22, 2005, 11:05:51 PM10/22/05
to django...@googlegroups.com
Dan, I don't know if it's related, but did you see this?
http://www.djangoproject.com/weblog/2005/oct/18/admin_refactor/

Dan Lipsitt

unread,
Oct 22, 2005, 11:22:04 PM10/22/05
to Django users
Thanks Jeremy, yes I did.

I'm early on in my development process, so I just deleted my db and
recreated my project directory, only copying over my models dir. So
almost everything should be fresh. Plus this happens right after I
submit my user name and password in the admin, which makes me think it
isn't about my code.

Dan

Adrian Holovaty

unread,
Oct 23, 2005, 12:34:23 AM10/23/05
to django...@googlegroups.com
On 10/22/05, Dan Lipsitt <danli...@gmail.com> wrote:
> TemplateSyntaxError: 'log' is not a valid tag library
> [...]
> I just upgraded to rev 992. I deleted the old egg first, and I also
> tried removing the .pyc files as Adrian described (there were no
> .pyos).

Try this from the Python interactive interpreter:

>>> from django.contrib.admin.templatetags import log

If that raises an exception, it might give you some useful information.

Also, do you have "django.contrib.admin" in your INSTALLED_APPS?

Dan Lipsitt

unread,
Oct 23, 2005, 1:00:17 AM10/23/05
to Django users
> Try this from the Python interactive interpreter:
>
> >>> from django.contrib.admin.templatetags import log
>
> If that raises an exception, it might give you some useful information.

It imported fine.

> Also, do you have "django.contrib.admin" in your INSTALLED_APPS?

Yes, I do. I don't think I would see the admin login screen without it,
right?

Any other troubleshooting ideas?

Thanks,
Dan

Dan Lipsitt

unread,
Oct 24, 2005, 10:49:37 PM10/24/05
to Django users
I tried on another box and had the same problems, so I filed a ticket:
http://code.djangoproject.com/ticket/692

Dan Lipsitt

unread,
Oct 24, 2005, 11:18:57 PM10/24/05
to Django users
Resolved. See the ticket mentioned above.

jud...@gmail.com

unread,
Oct 25, 2005, 11:36:49 AM10/25/05
to Django users
Hi,

I'm still getting this error, despite following all the steps in the
tutorial, and the notes in the BackwardsIncompatibleChanges.

Is there something that I'm missing?

Thanks

J

Joey Coleman

unread,
Oct 25, 2005, 12:31:25 PM10/25/05
to django...@googlegroups.com
I was getting that error as well, despite having done several svn
updates, deleting any and all py{c,o} files, deleting the egg in the
site-packages directory, etc. Nothing worked.

However, following Dan's advice in the ticket above --- delete your
whole django checkout and get it fresh --- worked fine for me.

--joey

jud...@gmail.com

unread,
Oct 25, 2005, 5:56:26 PM10/25/05
to Django users
Aha! I removed my django checkout, and downloaded it fresh, and voila!
What confused me, was that the second comment on the ticket seems to
indicate that a fresh checkout was unecessary, and all that needed to
be done was remove the .pyc/o files, as per the BackwardChanges page,
which I had done, though maybe I just wasn't paying attention :)

Anyway, thank you to all, my learning is advancing again!

J

Reply all
Reply to author
Forward
0 new messages