opened
zvolsky
username_0
* django-smoke-tests version: 0.1.4
* Django version: 2.0
* Python version: 3.6.4
* Operating System: Debian 9

### Description

While working on the Django 2.0 support (see Pull Request) I had an other error during reporting of some exception.
I don't know if this is django-smoke-tests problem, but I think it could be.
Maybe you will be more familiar with this, so please look to the 2nd half ot the error report bellow (the 2nd AttributeError).
Of course it is nothing too much important.
Best regards, Mirek.


(ve_acatto) mirek@toshiba-deb9:~/w/dj/acatto/acatto$ ./manage.py smoke_tests
Traceback (most recent call last):
  File "/home/mirek/w/dj/acatto/ve_acatto/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/mirek/w/dj/acatto/ve_acatto/lib/python3.6/site-packages/django/core/management/base.py", line 335, in execute
    output = self.handle(*args, **options)
  File "/home/mirek/w/dj/acatto/ve_acatto/lib/python3.6/site-packages/django_smoke_tests/management/commands/smoke_tests.py", line 84, in handle
    generator.execute()
  File "/home/mirek/w/dj/acatto/ve_acatto/lib/python3.6/site-packages/django_smoke_tests/generator.py", line 91, in execute
    self.load_all_endpoints(URLResolver(r'^/', settings.ROOT_URLCONF).url_patterns)
  File "/home/mirek/w/dj/acatto/ve_acatto/lib/python3.6/site-packages/django_smoke_tests/generator.py", line 119, in load_all_endpoints
    parent_url + url_pattern.regex.pattern,
AttributeError: 'URLPattern' object has no attribute 'regex'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/home/mirek/w/dj/acatto/ve_acatto/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/home/mirek/w/dj/acatto/ve_acatto/lib/python3.6/site-packages/django/core/management/__init__.py", line 365, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/mirek/w/dj/acatto/ve_acatto/lib/python3.6/site-packages/django/core/management/base.py", line 290, in run_from_argv
    if options.traceback or not isinstance(e, CommandError):
AttributeError: 'Namespace' object has no attribute 'traceback'
exception handling error
issue
created
kamilkijak
username_1
Mirek, thank you for reporting this.
comment
closed
kamilkijak
username_1
issue
created
kamilkijak
username_1
Thank you for reporting this.

The problem is that in the Django command for smoke tests there is a custom `CommandParser` applied. Apparently it causes some problems as Django `BaseCommand` expects some specific arguments in that `CommandParser`. This time `traceback` was missing.
comment