Well... this patch got me past it. It seems that some of the table names are unicode and other table names are str. I wonder if this is because I upgraded my django version part way through the tutorial...
--- management.py (revision 5818) +++ management.py (working copy) @@ -65,11 +65,12 @@ for model in models.get_models(app): all_models.append(model) if backend.uses_case_insensitive_names: - converter = str.upper + converter = unicode.upper else: converter = lambda x: x - return set([m for m in all_models if converter(m._meta.db_table) in map(converter, table_list)]) + return set([m for m in all_models if converter(unicode(m._meta.db_table)) in map(converter, table_list)]) + def _get_table_list(): "Gets a list of all db tables that are physically installed." from django.db import connection, get_introspection_module On Aug 5, 8:26 pm, Brian Duff <[EMAIL PROTECTED]> wrote: > I'm trying to follow the django tutorial with the latest SVN trunk (I > had to upgrade from 0.96 because there appears to be an issue with > 0.96 and Oracle databases). At the point > inhttp://www.djangoproject.com/documentation/tutorial01/ > that it instructs you to "python manage.py sql polls", I see: > > Traceback (most recent call last): > File "manage.py", line 11, in <module> > execute_manager(settings) > File "/usr/local/lib/python2.5/site-packages/django/core/ > management.py", line 1725, in execute_manager > execute_from_command_line(action_mapping, argv) > File "/usr/local/lib/python2.5/site-packages/django/core/ > management.py", line 1684, in execute_from_command_line > output = action_mapping[action](mod) > File "/usr/local/lib/python2.5/site-packages/django/core/ > management.py", line 117, in get_sql_create > known_models = set([model for model in > _get_installed_models(_get_table_list()) if model not in app_models]) > File "/usr/local/lib/python2.5/site-packages/django/core/ > management.py", line 71, in _get_installed_models > return set([m for m in all_models if converter(m._meta.db_table) > in map(converter, table_list)]) > TypeError: descriptor 'upper' requires a 'str' object but received a > 'unicode' > > A quick scan through management.py seems to suggest that, true enough, > converter is often str.upper. Any ideas how I can resolve this? > > Thanks, > Brian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---