ImportError: cannot import name patterns when access horizon using devstack

Bug #1707040 reported by juanjuan li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloudkitty
New
Undecided
Unassigned

Bug Description

I followed this link http://www.somsubhra.com/2017/03/30/devstack-openstack-test-environment-for-the-impatient/ to install devstack on my vm[x2go].
devstack works fine without cloudkitty.After enabling cloudkitty services, horizion shows some error.

Here is the error from horizion_error.log
root@jl044-KVM:/var/log/apache2# tail horizon_error.log
2017-07-27 18:23:40.671004 self._wrapped = self._setupfunc()
2017-07-27 18:23:40.671007 File "/opt/stack/horizon/horizon/base.py", line 833, in url_patterns
2017-07-27 18:23:40.671010 return self._urls()[0]
2017-07-27 18:23:40.671013 File "/opt/stack/horizon/horizon/base.py", line 858, in _urls
2017-07-27 18:23:40.671016 import_module('%s.%s' % (package, mod_name))
2017-07-27 18:23:40.671019 File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
2017-07-27 18:23:40.671022 __import__(name)
2017-07-27 18:23:40.671025 File "/opt/stack/cloudkitty-dashboard/cloudkittydashboard/overrides.py", line 17, in <module>
2017-07-27 18:23:40.671028 from django.conf.urls import patterns # noqa
2017-07-27 18:23:40.671031 ImportError: cannot import name patterns

Here is how I set up local.conf
[[local|localrc]]
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

# ceilometer
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git master

# horizon
enable_service horizon

# cloudkitty
enable_plugin cloudkitty https://git.openstack.org/openstack/cloudkitty.git master
enable_service ck-api ck-proc
CLOUDKITTY_COLLECTOR=ceilometer

I think the problem comes from the version of django. pattern has been deprecated since 1.8 and cloudkitty seems to still use version of 1.8.I have tried to change my latest django to the older version of 1.8, but there are some other errors pop up.

Does anyone can fix this problem?

Thanks

Revision history for this message
juanjuan li (happyljj) wrote :

The version of openstack which devstack is using is pike

Revision history for this message
Christophe Sauthier (christophe.sauthier) wrote :

Hello

Thanks for reporting.
The bug you have faced should be fixed right now. Can you please confirm it ?

Revision history for this message
juanjuan li (happyljj) wrote :

Hi,christophe.sauthier:
Yes, I can confirm that this bug still exits. Is there anything I should provide with?

Revision history for this message
Christophe Sauthier (christophe.sauthier) wrote :

Hello

This should be fixed now. Can you confirm it ?

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.