Code

Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#1556 closed defect (fixed)

[magic-removal - r2594] Error/Typo in "django/core/management.py" causes "manage.py install app" to fail.

Reported by: pawel.sawicki@… Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description (last modified by adrian)

Hello!

In the 2594th revision of "django/core/management.py" there's an error (I suppose) which was introduced in r2567.

$ ./manage.py install sampleapp
Traceback (most recent call last):
  File "./manage.py", line 17, in ?
    execute_manager(settings)
  File "/usr/lib/python2.4/site-packages/django/core/management.py", line 1184, in execute_manager
    execute_from_command_line(action_mapping)
  File "/usr/lib/python2.4/site-packages/django/core/management.py", line 1152, in execute_from_command_line
    output = action_mapping[action](mod)
  File "/usr/lib/python2.4/site-packages/django/core/management.py", line 535, in install
    sys.stderr.write(style.ERROR("""Error: %s couldn't be installed. Possible reasons:
TypeError: cannot concatenate 'str' and 'instance' objects

It can be fixed by:

$ svn diff django/core/management.py
Index: django/core/management.py
===================================================================
--- django/core/management.py   (revision 2594)
+++ django/core/management.py   (working copy)
@@ -537,7 +537,7 @@
   * At least one of the database tables already exists.
   * The SQL was invalid.
 Hint: Look at the output of 'django-admin.py sqlall %s'. That's the SQL this command wasn't able to run.
-The full error: """ % (app_name, app_name)) + style.ERROR_OUTPUT(e) + '\n')
+The full error: """ % (app_name, app_name)) + str(style.ERROR_OUTPUT(e)) + '\n')
         transaction.rollback_unless_managed()
         sys.exit(1)
     transaction.commit_unless_managed()

Though I don't know if it was the author's intention.

Attachments (0)

Change History (3)

comment:1 Changed 8 years ago by pawel.sawicki@…

[Update]

The revision that introduces the error is the r2585.

BTW - sorry for the wrong formatting of the previous report.

comment:2 Changed 8 years ago by adrian

  • Description modified (diff)

(Fixed formatting in description.)

comment:3 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [2596]) magic-removal: Fixed #1556 -- Fixed typo in django.core.management from [2585]. Thanks, pawel.sawicki

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.