Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
object has no _state

In my Django app I have model:

class Voivodeship(models.Model):
    name = models.CharField(max_length=20, primary_key=True)

I also have script to build my database from raw data:

import app.models as models
...
voivodeships[name] = models.Voivodeship(name=name)
voivodeships[name].save()

But when I try to interpret it in python manage.py shell using exec (exec(open('filler.py').read())) it returns error:

'Voivodeship' object has no attribute '_state'

And I don't know what's going on. Can you suggest me any solution?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!