You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I found the strange behavior of django-cities-light and django-modeltranslation when they are installed together.
If I try to make cities_light --force-import-all an error occurs:
manage.py@laowaiboard > cities_light --force-import-all
bash -cl "/Users/vadim/Documents/Bitbucket/laowaiboard/env/bin/python /Applications/PyCharm.app/Contents/helpers/pycharm/django_manage.py cities_light --force-import-all /Users/vadim/Documents/Bitbucket/laowaiboard"
INFO Downloading http://download.geonames.org/export/dump/countryInfo.txt into /Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/cities_light/data/countryInfo.txt
INFO Importing countryInfo.txt
/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/autoslug/utils.py:31: RuntimeWarning: Argument <type 'str'> is not an unicode object. Passing an encoded string will likely have unexpected results.
return django_slugify(unidecode(value))
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_manage.py", line 41, in <module>
run_module(manage_file, None, '__main__', True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Users/vadim/Documents/Bitbucket/laowaiboard/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/django/core/management/base.py", line 393, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/django/core/management/base.py", line 444, in execute
output = self.handle(*args, **options)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/cities_light/management/commands/cities_light.py", line 167, in handle
self.country_import(items)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/cities_light/management/commands/cities_light.py", line 254, in country_import
self.save(country)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/cities_light/management/commands/cities_light.py", line 501, in save
model.save()
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/django/db/models/base.py", line 734, in save
force_update=force_update, update_fields=update_fields)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/django/db/models/base.py", line 771, in save_base
update_fields=update_fields, raw=raw, using=using)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/django/dispatch/dispatcher.py", line 201, in send
response = receiver(signal=self, sender=sender, **named)
File "/Users/vadim/Documents/Bitbucket/laowaiboard/env/lib/python2.7/site-packages/autoslug/fields.py", line 304, in modeltranslation_update_slugs
populate_from_value = getattr(instance, populate_from_localized)
AttributeError: 'Country' object has no attribute 'name_ascii_en'
Process finished with exit code 1
But If you comment out the line «modeltranslation» in INSTALLED_APPS, cities_light --force-import-all works as well.
The text was updated successfully, but these errors were encountered:
Hi. I found the strange behavior of django-cities-light and django-modeltranslation when they are installed together.
If I try to make
cities_light --force-import-all
an error occurs:But If you comment out the line «modeltranslation» in INSTALLED_APPS,
cities_light --force-import-all
works as well.The text was updated successfully, but these errors were encountered: