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?
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.]
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.
On 12/20/06, Cam McVey <cam.mc...@gmail.com> wrote:
> 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.]
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.
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
On Dec 20, 7:44 am, "Cam McVey" <cam.mc...@gmail.com> wrote:
> 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?
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.
> 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?