Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7926935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:03:10+00:00 2026-06-03T19:03:10+00:00

I entered: python manage.py loaddata fixtures\companies.json. It gives me an error. What is the

  • 0

I entered: “python manage.py loaddata fixtures\companies.json”. It gives me an error.

What is the proper way to load the json data and then push it to the gae datastore?

Here is my model:

class Company(models.Model):      
    id = models.AutoField(primary_key=True);
    name = models.CharField(max_length=100);
    address = models.CharField(max_length=100, null=True);
    city = models.CharField(max_length=100);
    state = models.CharField(max_length=25);
    zip = models.IntegerField();
    latitude = models.CharField(max_length=20, null=True)
    longitude = models.CharField(max_length=20, null=True)  
    phone = models.CharField(max_length=15, null=True);
    website = models.CharField(max_length=50, null=True);
    email = models.EmailField(max_length=50, null=True);
    hiring = models.BooleanField(default=False);    
    approved = models.BooleanField(default=False);
    date_added = models.DateTimeField(auto_now_add=True);
    about_us = models.TextField(max_length=500, null=True);

Here is my fixture:

[
    {
        "model": "Companies.Company",
        "fields": {
            "id": 111,
            "name": "1-800 Postcards America's Printing Company",
            "address": "121 Varick Street, 7th Floor",
            "city": "New York",
            "state": "NY",
            "zip": 10013,
            "latitude": "40.724831999999999",
            "longitude": "-74.00609",
            "phone": "212-741-1070",
            "website": "http://www.1800postcards.com",
            "email": "info@1800postcards.com",
            "hiring": "FALSE",
            "approved": "TRUE",
            "date_added": "April 30, 2012, 6:08 p.m.",
            "about_us": "With over 30 years of business experience as full service offset printers and over 200 years of combined knowledge in our production department and press rooms, 1-800Postcards is your professional printer. Our state-of-the-art 125,000 square foot facility is located in the heart of New York City, with an additional web offset plant in New Jersey for our larger orders 500,000 and up. This makes it possible for us to print and mail the highest quality postcards on the market today — at the most competitive rates in the country."
        }
    },
    {
        "model": "Companies.Company",
        "fields": {
            "id": 222,
            "name": "20x200 ",
            "address": "6 Spring Street",
            "city": "New York",
            "state": "NY",
            "zip": 10012,
            "latitude": "40.721052999999998",
            "longitude": "-73.994322999999994",
            "phone": "212-219-0166",
            "website": "http://www.20x200.com/",
            "email": "hello@20x200.com",
            "hiring": "TRUE",
            "approved": "TRUE",
            "date_added": "April 30, 2012, 6:08 p.m.",
            "about_us": "(limited editions × low prices) + the internet = art for everyone. That simple formula, devised by 20x200's founder, Jen Bekman, is what launched 20x200 back in 2007. With that, we set our sights on two core goals: We want everyone to collect art, and we want to enable an economy that allows more artists to make a living by making work. More so, we wanted something as awesome as collecting art to be fun. That's right: fun!"
        }
    },
    {
        "model": "Companies.Company",
        "fields": {
            "id": 333,
            "name": "Adafruit",
            "address": "80 Nassau st #4C",
            "city": "New York",
            "state": "NY",
            "zip": 10038,
            "latitude": "40.709938000000001",
            "longitude": "-74.007987999999997",
            "phone": "646-248-7822",
            "website": "http://www.adafruit.com/",
            "email": "N/A",
            "hiring": "TRUE",
            "approved": "TRUE",
            "date_added": "April 30, 2012, 6:08 p.m.",
            "about_us": "We pride ourselves on having great prices, the best customer service, support and fast shipping. We hope we can assist you on your journey of learning – At Adafruit we celebrate “Engineering Happiness”! Adafruit is a 100% Woman-Owned Small Business."
        }
    }
]

Here is the error I get:

Problem installing fixture 'fixtures\companies.json': Traceback (most recent call last):
  File "C:\Users\Joe\Desktop\My School Stuff\Spring 2012\CS 473\ny-tech\ny-tech\django\core\management\commands\loaddata.py", line 169, in handle
    for obj in objects:
  File "C:\Users\Joe\Desktop\My School Stuff\Spring 2012\CS 473\ny-tech\ny-tech\django\core\serializers\json.py", line 35, in Deserializer
    for obj in PythonDeserializer(simplejson.load(stream), **options):
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\__init__.py", line 332, in load
    use_decimal=use_decimal, **kw)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\__init__.py", line 388, in loads
    return _default_decoder.decode(s)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\decoder.py", line 402, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\decoder.py", line 418, in raw_decode
    obj, end = self.scan_once(s, idx)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\scanner.py", line 71, in scan_once
    return _scan_once(string, idx)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\scanner.py", line 44, in _scan_once
    return parse_array((string, idx + 1), _scan_once)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\decoder.py", line 284, in JSONArray
    value, end = scan_once(s, end)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\scanner.py", line 42, in _scan_once
    _scan_once, object_hook, object_pairs_hook, memo)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\decoder.py", line 230, in JSONObject
    value, end = scan_once(s, end)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\scanner.py", line 42, in _scan_once
    _scan_once, object_hook, object_pairs_hook, memo)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\decoder.py", line 230, in JSONObject
    value, end = scan_once(s, end)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\scanner.py", line 39, in _scan_once
    return parse_string(string, idx + 1, encoding, strict)
  File "C:\Program Files (x86)\Google\google_appengine\lib\simplejson\simplejson\decoder.py", line 121, in py_scanstring
    content = unicode(content, encoding)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x97 in position 484: invalid start byte

Exception AttributeError: "'NoneType' object has no attribute 'mkstemp'" in <bound method DatastoreFileStub.__del__ of <google.appengine.api.datastore_file_stub
.DatastoreFileStub object at 0x02930F10>> ignored
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T19:03:11+00:00Added an answer on June 3, 2026 at 7:03 pm

    This type of error can occur with invalid JSON. The easiest thing to do is to make sure your JSON validates with JSON Lint, fix any errors it finds, and try the upload again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What is the preferred/ usual way of storing data that is entered by the
In python, I can use eval() to execute user entered code in my program.
I currently have some code in Python where I have entered the values from
I have a Python script that we're using to parse CSV files with user-entered
The traceback is on a '''python manage.py syncdb''', and happens immediately after the password
In Python Shell, I entered: aList = ['a', 'b', 'c', 'd'] for i in
I'm reading in lots of user entered data that represent phone numbers from files.
I was looking for a way to transform text entered into the textctrl field
I'm trying to extract some data from various HTML pages using a python program.
In my python program, an if statement is not being entered. I have simplified

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.