question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: cities_light.models.MultipleObjectsReturned

See original GitHub issue

Hi:

I get this error as output for ./mange.py cities_light:

cities_light.models.MultipleObjectsReturned: get() returned more than one SubRegion -- it returned 5!

Related Settings for Python 3.7.3, django 2.2 on Debian:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    }
}

# CITIES LIGHT
# http://www.lingoes.net/en/translator/langcode.htm
CITIES_LIGHT_TRANSLATION_LANGUAGES = ['es', 'en']
CITIES_LIGHT_INCLUDE_COUNTRIES = ['US', 'MX']
# http://www.geonames.org/export/codes.html
CITIES_LIGHT_INCLUDE_CITY_TYPES = ['PPL']

How can I solve this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
NaturalBornCampercommented, Oct 15, 2020

Nevermind that, deleting my container and starting over fixed the issue

1reaction
marianoeramirezcommented, Oct 14, 2020

Yes is fixed on version 3.8. Please open a different ticket with your stack trace of the error to now better wich problem do you have?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: cities_light.models.MultipleObjectsReturned · Issue #222
Hi: I get this error as output for ./mange.py cities_light: cities_light.models.MultipleObjectsReturned: get() returned more than one SubRegion ...
Read more >
MultipleObjectsReturned() in Django error - Stack Overflow
I have posted the code below, when I try to view this model as an object in http://127.0.0.1:8000/admin/ I get the following error:....
Read more >
yourlabs - Bountysource
I get this error as output for ./mange.py cities_light: cities_light.models.MultipleObjectsReturned: get() returned more than one SubRegion -- it returned 5 ...
Read more >
django-cities-light – Simple django-cities alternative — django ...
This add-on provides models and commands to import country, region/state, and city data in your database. The data is pulled from GeoNames and...
Read more >
[Solved]-Django: Class to log a mail error-django - appsloveworld.com
If you read the format mini language spec you'll notice that formatting a string can allow for passing the order of the received...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found