Opened 13 years ago

Closed 13 years ago

#5566 closed (fixed)

Problem running django svn trunk (rev 6403): "NameError: global name 'subcommand' not defined"

Reported by: thomas@… Owned by: nobody
Component: Core (Management commands) Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Ran my unittests with django svn trunk last updated about 2 weeks ago (sorry, no longer have what rev that was) successfully. Updated to latest trunk (rev 6403) and then got this error:

thomas$ python test
2007-09-21 13:26:35,034:root:INFO:  Logging configured and ready to go.
Creating test database...
Traceback (most recent call last):
  File "", line 11, in ?
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management/", line 264, in execute_manager
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management/", line 215, in execute
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management/", line 70, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management/", line 84, in execute
    output = self.handle(*args, **options)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management/commands/", line 34, in handle
    failures = test_runner(test_labels, verbosity=verbosity, interactive=interactive)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/test/", line 142, in run_tests
    create_test_db(verbosity, autoclobber=not interactive)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/test/", line 152, in create_test_db
    call_command('syncdb', verbosity=verbosity, interactive=False)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/django/core/management/", line 120, in call_command
    klass = load_command_class(app_name, subcommand)
NameError: global name 'subcommand' is not defined

No code changes between test runs with previous and latest django revs.

Attachments (1)

fixed.patch (592 bytes) - added by davisp 13 years ago.
Preliminary patch looks like it fixes things

Download all attachments as: .zip

Change History (5)

comment:1 Changed 13 years ago by thomas@…

Looks like this might have been introduced earlier today with changeset [6402].

Changed 13 years ago by davisp

Attachment: fixed.patch added

Preliminary patch looks like it fixes things

comment:2 Changed 13 years ago by davisp

This looks like a simple typo mixing up subcommand and name. I changed it and it makes things not spew out warnings.

comment:3 Changed 13 years ago by thomas@…

Confirmed: Changing subcommand to name on line 120 of resolved my error and my tests run successfully again. It was fun digging into that part of the django codebase :-)

comment:4 Changed 13 years ago by Russell Keith-Magee

Resolution: fixed
Status: newclosed

(In [6404]) Fixed #5566 -- Fixed typo from [6042]. Thanks to thomas@… and mir for bringing attention to this.

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