ImportError: cannot import name pattern Django

Bug #1709742 reported by yapeng Yang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Backup/Restore and DR (Freezer)
Fix Released
Undecided
yapeng Yang

Bug Description

2017-08-09 09:29:29.998463 __import__(name)
2017-08-09 09:29:29.998465 File "/opt/yyp/code/openstack/horizon/openstack_dashboard/urls.py", line
 38, in <module>
2017-08-09 09:29:29.998466 url(r'', include(horizon.urls)),
2017-08-09 09:29:29.998468 File "/usr/lib/python2.7/site-packages/django/conf/urls/__init__.py", li
ne 51, in include
2017-08-09 09:29:29.998469 if isinstance(urlconf_module, six.string_types):
2017-08-09 09:29:29.998471 File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line
 234, in inner
2017-08-09 09:29:29.998472 self._setup()
2017-08-09 09:29:29.998474 File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line
 380, in _setup
2017-08-09 09:29:29.998476
2017-08-09 09:29:29.998477 File "/opt/yyp/code/openstack/horizon/horizon/base.py", line 833, in url
_patterns
2017-08-09 09:29:29.998478 return self._urls()[0]
2017-08-09 09:29:29.998480 File "/opt/yyp/code/openstack/horizon/horizon/base.py", line 867, in _ur
ls
2017-08-09 09:29:29.998482 include(dash._decorated_urls)))
2017-08-09 09:29:29.998483 File "/opt/yyp/code/openstack/horizon/horizon/base.py", line 533, in _de
corated_urls
2017-08-09 09:29:29.998485 urlpatterns = self._get_default_urlpatterns()
2017-08-09 09:29:29.998486 File "/opt/yyp/code/openstack/horizon/horizon/base.py", line 120, in _ge
t_default_urlpatterns
2017-08-09 09:29:29.998488 urls_mod = import_module('.urls', package_string)
2017-08-09 09:29:29.998489 File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_mo
dule
2017-08-09 09:29:29.998491 __import__(name)
2017-08-09 09:29:29.998492 File "/opt/yyp/code/openstack/freezer-web-ui/disaster_recovery/urls.py",
 line 16, in <module>
2017-08-09 09:29:29.998494 from django.conf.urls import patterns
2017-08-09 09:29:29.998495 ImportError: cannot import name patterns

patterns () from Django1.8 has been abandoned, Django1.10 remove it, so reported into the pattern error.

Changed in freezer:
assignee: nobody → yapeng Yang (yang-yapeng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to freezer-web-ui (master)

Fix proposed to branch: master
Review: https://review.openstack.org/492361

Changed in freezer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer-web-ui (master)

Reviewed: https://review.openstack.org/492361
Committed: https://git.openstack.org/cgit/openstack/freezer-web-ui/commit/?id=d6ae33196bb84d678f75d49567e14a68c51c576c
Submitter: Jenkins
Branch: master

commit d6ae33196bb84d678f75d49567e14a68c51c576c
Author: yapeng <yang.yapeng@99cloud.net>
Date: Thu Aug 10 02:57:19 2017 +0000

    Replace patterns syntax by url

    The old syntax using patterns is deprecated in Django 1.8, and is
    removed in Django 1.10. The current version Django<1.11, this
    patch fix the syntax.

    Change-Id: I26564c97538c23378c0494739257b31dd8796f5a
    Closes-Bug: #1709742

Changed in freezer:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/freezer-web-ui 5.0.0.0rc1

This issue was fixed in the openstack/freezer-web-ui 5.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.