coderholic / django-cities

Countries and cities of the world for Django projects
MIT License
927 stars 372 forks source link

--import=region: NameError: global name 'class_' is not defined #64

Closed bashu closed 10 years ago

bashu commented 10 years ago

python ./manage.py cities --settings=bookingpal.settings.staging --import=region --force

INFO File up-to-date: admin1CodesASCII.txt
INFO Building country index
INFO Importing region data
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/var/www/bookingpal.com/releases/20140622112133/virtualenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/var/www/bookingpal.com/releases/20140622112133/virtualenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/www/bookingpal.com/releases/20140622112133/virtualenv/local/lib/python2.7/site-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/var/www/bookingpal.com/releases/20140622112133/virtualenv/local/lib/python2.7/site-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/var/www/bookingpal.com/releases/20140622112133/virtualenv/local/lib/python2.7/site-packages/cities/management/commands/cities.py", line 68, in handle
    func()
  File "/var/www/bookingpal.com/releases/20140622112133/virtualenv/local/lib/python2.7/site-packages/cities/management/commands/cities.py", line 222, in import_region
    self.logger.warning("{0}: {1}: Cannot find country: {2} -- skipping".format(class_.__name__, region.name, country_code))
NameError: global name 'class_' is not defined