Strange django-admin.py behaviour

27 views
Skip to first unread message

Cam McVey

unread,
Dec 20, 2006, 7:44:27 AM12/20/06
to django...@googlegroups.com
Hi all!

Problem: when running the django-admin.py script, regardless how I
call it, I always just get the help/usage text back. No error message,
just the message.

Background: This is Python 2.4 on a windows xp box that's had django
on it since way back (0.92 or so) with everything working fine. I
hadn't done an SVN update in a while so I thought I'd refresh the
install before starting my next project. Updated to latest trunk, went
to start new project by running "django-admin.py startproject xxx" and
got the behaviour described above.

Things I've tried: I've re-run the svn update - no help. Deleted the
django install and checked out latest trunk again - no help. Deleted
that instal and checked out release 0.95 - no help. I've tried calling
"django-admin.py --version", "django-admin.py runserver" and a few
other 'actions', all with no difference in the output. I've also
opened up a python shell, and did a "import django, django.VERSION"
which reported the expcted 0.95.

Do any of you fine people have any ideas of what might be going wrong
or things I could try or logfiles I could check or anything?

Many thanks,
Cam

Cam McVey

unread,
Dec 20, 2006, 10:01:36 AM12/20/06
to django...@googlegroups.com
OK, here's a wee update: if I call the script like this, I get sensible output:
"python C:\Python24\Scripts\django-admin --version"
but if I just try:
"C:\Python24\Scripts\django-admin --version"
it doesn't work (I just get the help text).
[By the way, "C:\Python24\Scripts" is on my system PATH, and I've
setup ".py" as an executable, which meant that I'd just call
"django-admin --version" from aywhere in the filesystem and it used to
work before the update.]

Anyone able to shed some light on it?

Thanks,
Cam

Waylan Limberg

unread,
Dec 20, 2006, 10:49:02 AM12/20/06
to django...@googlegroups.com
When you updated, did you copy a new version of django-admin.py to
C:\Python\Scripts\? If you still have an older version of the file
there that may be your problem.


--
----
Waylan Limberg
way...@gmail.com

Cam McVey

unread,
Dec 20, 2006, 11:04:30 AM12/20/06
to django...@googlegroups.com
On 12/20/06, Waylan Limberg <way...@gmail.com> wrote:
>
> When you updated, did you copy a new version of django-admin.py to
> C:\Python\Scripts\? If you still have an older version of the file
> there that may be your problem.

Yeah, I did.

As a workaround for now, I'm just calling the script via a call to
"python" and passing the full path. Sucks a bit, though.

Cam.

Alex Li

unread,
Dec 20, 2006, 12:51:27 PM12/20/06
to Django users
I think there might be something wrong in your .py extension to
python.exe linking in Windows setup. Specifically it seems like your
python script is working but the arguments after the first one is not
being passed on. Did you have %* at the end, like this?

"D:\Python24\python.exe" "%1" %*

HTH,
Alex

Cam McVey

unread,
Dec 21, 2006, 5:31:32 AM12/21/06
to django...@googlegroups.com
Alex,

Ah! That worked a treat!! I never even thought to look there since it
was previously working fine. I've gone in and edited it (Open WIndows
Explorer, Tools / Folder Options ... / Files Types) and it's working
great.

Thanks so much!

Regards,
Cam

Reply all
Reply to author
Forward
0 new messages