Closed christophlingg closed 7 years ago
I don't think that it's related django 1.10 update
What is your JENKINS_TASKS?
Did't you remove with_coverage from it?
I removed with_coverage and my setting looks now like this:
JENKINS_TASKS = ()
I just upgraded from 1.8 to 1.10 and this error popped up, so I thought it is related to django's version bump.
Now i get this error:
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/data/jenkins/workspace/my_project/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/data/jenkins/workspace/my_project/venv/lib/python3.4/site-packages/django/core/management/__init__.py", line 341, in execute
django.setup()
File "/data/jenkins/workspace/my_project/venv/lib/python3.4/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/data/jenkins/workspace/my_project/venv/lib/python3.4/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/data/jenkins/workspace/my_project/venv/lib/python3.4/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
File "/data/jenkins/workspace/my_project/venv/lib/python3.4/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/data/jenkins/workspace/my_project/venv/lib/python3.4/site-packages/django_jenkins/apps.py", line 3, in <module>
from django_jenkins.tasks.with_coverage import CoverageReporter
File "/data/jenkins/workspace/my_project/venv/lib/python3.4/site-packages/django_jenkins/tasks/with_coverage.py", line 5, in <module>
from django.utils.importlib import import_module
ImportError: No module named 'django.utils.importlib'
According to stackoverflow django.utils.importlib was removed in django 1.9 in favor of Python's own from importlib import import_module
If you upgrading django you have to update django-jenkins to the version that has support for the new django version.
This was fixed more than year ago
https://github.com/kmmbvnr/django-jenkins/commit/5bf9afd37381da9cf50347681b34dc39258fa09e
Please carefully read the changelog for each version and update django-jenkins settings according to the instructions.
Thanks for your help
After upgrading do django 1.10, I got this error. Anything I can do about it?
The corresponding code fragment: