Opened 17 years ago

Closed 17 years ago

#4708 closed (invalid)

manage.py dbshell problem on Windows

Reported by: anonymous Owned by: Adrian Holovaty
Component: Core (Management commands) Version: dev
Severity: Keywords: manage.py dbshell
Cc: yml.nospam@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hello,

I have a problem on my laptop when I run this command: "manage.py runserver" I get this error message:

C:\yml\_myScript_\dj_things\web_development\workspace\dj_project>manage.py dbshell
Traceback (most recent call last):

File "C:\yml\_myScript_\dj_things\web_development\workspace\dj_project\manage.py", line 11, in <module>

execute_manager(settings)

File "C:\yml\_myScript_\dj_things\web_development\svn_views\django_src\unicode\django\core\management.py", line 1736,

in execute_manager

execute_from_command_line(action_mapping, argv)

File "C:\yml\_myScript_\dj_things\web_development\svn_views\django_src\unicode\django\core\management.py", line 1631,

in execute_from_command_line

action_mapping[action]()

File "C:\yml\_myScript_\dj_things\web_development\svn_views\django_src\unicode\django\core\management.py", line 1330,

in dbshell

runshell()

File "C:\yml\_myScript_\dj_things\web_development\svn_views\django_src\unicode\django\db\init.py", line 28, in <la

mbda>

runshell = lambda: import('django.db.backends.%s.client' % settings.DATABASE_ENGINE, {}, {}, []).runshell()

File "C:\yml\_myScript_\dj_things\web_development\svn_views\django_src\unicode\django\db\backends\mysql\client.py", li

ne 27, in runshell

os.execvp('mysql', args)

File "C:\install\Python25\lib\os.py", line 354, in execvp

_execvpe(file, args)

File "C:\install\Python25\lib\os.py", line 392, in _execvpe

func(fullname, *argrest)

OSError: [Errno 2] No such file or directory

Also the rest of the framework is working just fine. I was running from the trunk on windows with python 2.5. Then I try to use the unicode branch same result. Then I have updated from python 2.5 to 2.5.1 same result.

Thank you for your help

Change History (6)

comment:1 by Paul Bx <pb@…>, 17 years ago

Summary: manage.py dbshell is brokenmanage.py dbshell problem on Windows

comment:2 by Ramiro Morales, 17 years ago

It seems you are using dj_project as your Django project name. This name should be a valid Python module name (see the Note here http://www.djangoproject.com/documentation/tutorial01/#creating-a-project) and dj_project isn't.

comment:3 by Ramiro Morales, 17 years ago

Disregard my previous post (I remember having some problems when using _ in a project/app name that I solved renaming them; but now I'm testing things with a dummy project and if works Ok).

Reading the complete traceback (what I shold have done first :) it seems you don't have the mysql.exe (does such thing exist?) MySQL command line client accesible via the PATH envvar.

comment:4 by anonymous, 17 years ago

I finally manage to test this on a Linux box and it is working fine there. I am assuming that this bug is a windows only or it is linked to the configuration of this particular computer.

comment:5 by Ramiro Morales, 17 years ago

So, can this ticket be closed?

comment:6 by anonymous, 17 years ago

Resolution: invalid
Status: newclosed

I confirm that this issue was due to the fact that mysql.exe was not in my path. I set this ticket as invalid.
Thank you for your help

Note: See TracTickets for help on using tickets.
Back to Top