question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Attribute error in Django 2.0

See original GitHub issue

Hi, seems that green doesn’t work with Django 2.0.

# python manage.py test

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    execute_from_command_line(sys.argv)
  File "/home/vagrant/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
    utility.execute()
  File "/home/vagrant/venv/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/vagrant/venv/lib/python3.6/site-packages/django/core/management/commands/test.py", line 26, in run_from_argv
    super().run_from_argv(argv)
  File "/home/vagrant/venv/lib/python3.6/site-packages/django/core/management/base.py", line 288, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/vagrant/venv/lib/python3.6/site-packages/django/core/management/base.py", line 335, in execute
    output = self.handle(*args, **options)
  File "/home/vagrant/venv/lib/python3.6/site-packages/django/core/management/commands/test.py", line 59, in handle
    failures = test_runner.run_tests(test_labels)
  File "/home/vagrant/venv/lib/python3.6/site-packages/green/djangorunner.py", line 124, in run_tests
    result = run(suite, stream, args)
  File "/home/vagrant/venv/lib/python3.6/site-packages/green/runner.py", line 115, in run
    result.addProtoTestResult(proto_test_result)
  File "/home/vagrant/venv/lib/python3.6/site-packages/green/result.py", line 346, in addProtoTestResult
    for test, err in proto_test_result.errors:
AttributeError: 'NoneType' object has no attribute 'errors'

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
charlsagentecommented, Jun 12, 2018

@CleanCut It is possible in the django documentation. https://docs.djangoproject.com/en/2.0/topics/testing/overview/ with the –parallel flag. BTW Thanks I had the same issue and processes=1 solved the issue.

1reaction
CleanCutcommented, Jan 23, 2018

It could be the same situation. For systems not designed for concurrent testing (django), I recommend specifying in your green configuration file to use only one process.

processes = 1

Please let me know if that helps. If it does, then I will add that advice to the Django section of the readme.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django 2.0 CreateView AttributeError - Stack Overflow
The problem is in your SlugField. The unique_for_date parameter needs to point to a field containing a date or datetime - you have...
Read more >
'module' object has no attribute 'lru_cache' with python 3.6.4 ...
Django : 2.0.2. Apache/2.4.10 (Debian). First, I was getting the error. ImportError: No module named django.core.wsgi. Then I added Django to PYTHONPATH.
Read more >
RenameField crashes with AttributeError when renaming a ...
With Django 2.0, a RenameField on a model which has a reverse many to many relationship raises an exception: AttributeError: 'ManyToManyRel' object has...
Read more >
Django 2.0, First Level Class View, AttributeError: 'str' object ...
[Solved]-Django 2.0, First Level Class View, AttributeError: 'str' object has no attribute 'values'-django ... I found a solution to reuse my standard REST...
Read more >
Django attribute error. 'module' object has no attribute 'rindex'
Python – Django attribute error. 'module' object has no attribute 'rindex' ... I've just started using django, only on chapter 3 of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found