Closed jpadilla closed 10 years ago
Thanks for the report.
func_globals
is indeed gone in Python3.
This is fixed in the development version of django_extensions
.
I have uploaded version 1.3.7 which includes the fix for this issue.
I am using version 1.3.7
and i get same error.
Python 2.7.5
, Django 1.6.5
Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv self.execute(*args, **options.__dict__) File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute output = self.handle(*args, **options) File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django_extensions/management/commands/show_urls.py", line 107, in handle func_globals = func.__globals__ if six.PY3 else func.func_globals AttributeError: 'ArenaWrapper' object has no attribute 'func_globals'
Please try with changeset 8f262a4 on master.
This is what i've got with the changeset:
Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/Users/anatr/Projects/FanWaze/ArenaWaze/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv self.execute(*args, **options.__dict__) File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute output = self.handle(*args, **options) File "/Users/usr/Projects/Arena/lib/python2.7/site-packages/django_extensions/management/commands/show_urls.py", line 98, in handle raise Exception("Format style '%s' does not exist. Options: %s" % (format_style, FMTR.keys())) Exception: Format style 'None' does not exist. Options: ['dense', 'verbose']
options at line 96:
{'language': None, 'settings': None, 'pythonpath': None, 'verbosity': u'1', 'traceback': None, 'format_style': None, 'unsorted': None, 'decorator': None}
Changing line 96 from format_style = options.get('format_style', 'dense')
to format_style = options.get('format_style', 'dense') or 'dense'
did the trick.
Thanks for the feedback, per d8ef952 we also check explicitly for None and if so set the default. Could you check again with this commit please ?
If this works then I can do a new release so you can update any requirements you might have.
works like a charm ;) ty
Thanks for reporting and testing!
ty for addressing this issue so fast!
Tested on Python 3.3 and Django 1.6.5.