- 4.5k
- 3
- 51
- 80
I amhave been using Python 2.7, django1Django 1.5 and POstgreSQLand PostgreSQL 9.2 for two weeks. Never Never saw it before. Everything Everything is freshly installed on my Win7Windows 7 machine, so it should havehave default settings. Djungo Django beautifully generates tables in my db. Looks like everything works fine. I am able to dump data from my database by running:
manage.py dumpdata > test.json
or
manage.py dumpdata --indent4 > test.json
I saw that the jsonJSON file it looks as it should.
thenThen, I truncate some tables and try to load them from the JSON file with:
python manage.py loaddata database = T2 test.json // or without db name
I got the following error:
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
ItIf I open the test.json file byin notepad and, save it as utf8 andand try again, then I haveget:
"No JSON object could be decoded"
The file stillstill looks OK, not empty.
By the way, when I open the jsonJSON file bywith notepad it offers me to save it as Unicode. My My database has UTF8 encoding. Please advice Please advise. Thank you.
I am using Python 2.7, django1.5 and POstgreSQL 9.2 for two weeks. Never saw it before. Everything is freshly installed on my Win7 so it should have default settings. Djungo beautifully generates tables in my db. Looks like everything works fine. I am able to dump data from my database by
manage.py dumpdata > test.json
or
manage.py dumpdata --indent4 > test.json
I saw the json file it looks as it should.
then I truncate some tables and try to load them from JSON file
python manage.py loaddata database = T2 test.json // or without db name
I got
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
It I open the test.json file by notepad and save it as utf8 and try again then I have
"No JSON object could be decoded"
The file still looks OK, not empty.
By the way when I open the json file by notepad it offers me to save it as Unicode. My database has UTF8 encoding. Please advice. Thank you.
I have been using Python 2.7, Django 1.5 and PostgreSQL 9.2 for two weeks. Never saw it before. Everything is freshly installed on my Windows 7 machine, so it should have default settings. Django beautifully generates tables in my db. Looks like everything works fine. I am able to dump data from my database by running:
manage.py dumpdata > test.json
or
manage.py dumpdata --indent4 > test.json
I saw that the JSON file it looks as it should.
Then, I truncate some tables and try to load them from the JSON file with:
python manage.py loaddata database = T2 test.json // or without db name
I got the following error:
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
If I open the test.json file in notepad, save it as utf8 and try again, then I get:
"No JSON object could be decoded"
The file still looks OK, not empty.
By the way, when I open the JSON file with notepad it offers me to save it as Unicode. My database has UTF8 encoding. Please advise. Thank you.
I am using Python 2.7 , django1.5 and POstgreSQL 9.2 for two weeks. Never saw it before. Everything is freshly installed on my Win7 so it should has have default settings. Djungo beautiflybeautifully generates tables in my db. LokLooks like everything works fine. I am able to dump data from my database by
manage.py dumpdata > test.json
or
manage.py dumpdata --indent4 > test.json
I saw the json file it looks as it should.
then I truncate some tables and try to load them from JSON file
python manage.py loaddata database = T2 test.json // or without db name
I got
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
It I open the test.json file by notepad and save it as utf8 and try again then I have
"No JSON object could be decoded"
The file is still still looks OK, not empty.
By the way when I open the json file by notepad it offers me to save it as Unicode. My database has UTF8 encoding. Please advice. Thank you.
I am using Python 2.7 , django1.5 and POstgreSQL 9.2 for two weeks. Never saw it before. Everything is freshly installed on my Win7 so it should has default settings. Djungo beautifly generates tables in my db. Lok like everything works fine. I am able to dump data from my database by
manage.py dumpdata > test.json
or
manage.py dumpdata --indent4 > test.json
I saw the json file it looks as it should.
then I truncate some tables and try to load them from JSON file
python manage.py loaddata database = T2 test.json // or without db name
I got
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
It I open the test.json file by notepad and save it as utf8 and try again then I have
"No JSON object could be decoded"
The file is still looks OK, not empty.
By the way when I open the json file by notepad it offers me to save it as Unicode. My database has UTF8 encoding. Please advice. Thank you.
I am using Python 2.7 , django1.5 and POstgreSQL 9.2 for two weeks. Never saw it before. Everything is freshly installed on my Win7 so it should have default settings. Djungo beautifully generates tables in my db. Looks like everything works fine. I am able to dump data from my database by
manage.py dumpdata > test.json
or
manage.py dumpdata --indent4 > test.json
I saw the json file it looks as it should.
then I truncate some tables and try to load them from JSON file
python manage.py loaddata database = T2 test.json // or without db name
I got
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
It I open the test.json file by notepad and save it as utf8 and try again then I have
"No JSON object could be decoded"
The file still looks OK, not empty.
By the way when I open the json file by notepad it offers me to save it as Unicode. My database has UTF8 encoding. Please advice. Thank you.
I am using Python 2.7 , django1.5 and POstgreSQL 9.2 for two weeks. Never saw it before. Everything is freshly installed on my Win7 so it should has default settings. Djungo beautifly generates tables in my db. Lok like everything works fine. I am able to dump data from my database by manage.py dumpdata > test.json orby
manage.py dumpdata > test.json
manage.py dumpdata --indent4 > test.jsonor
manage.py dumpdata --indent4 > test.json
I saw the json file it looks as it should.
then I truncate some tables and try to load them from JsonJSON file
python manage.py loaddata database = T2 test.json // or without db name
python manage.py loaddata database = T2 test.json // or without db name II got "UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
It I open the test.json file by notepad and save it as utf8utf8 and try aganagain then I have
"No JSON object could be decoded"
"No JSON object could be decoded"
The file is still looks OK, not empty.
By the way when I open the json file by notepad it offers me to save it as Unicode. My database has UTF8 encoding. Please advice. Thank you.
I am using Python 2.7 , django1.5 and POstgreSQL 9.2 for two weeks. Never saw it before. Everything is freshly installed on my Win7 so it should has default settings. Djungo beautifly generates tables in my db. Lok like everything works fine. I am able to dump data from my database by manage.py dumpdata > test.json or
manage.py dumpdata --indent4 > test.json
I saw the json file it looks as it should.
then I truncate some tables and try to load them from Json file
python manage.py loaddata database = T2 test.json // or without db name I got "UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
It I open the test.json file by notepad and save it as utf8 and try agan then I have "No JSON object could be decoded" The file is still looks OK, not empty.
By the way when I open the json file by notepad it offers me to save it as Unicode. My database has UTF8 encoding. Please advice. Thank you.
I am using Python 2.7 , django1.5 and POstgreSQL 9.2 for two weeks. Never saw it before. Everything is freshly installed on my Win7 so it should has default settings. Djungo beautifly generates tables in my db. Lok like everything works fine. I am able to dump data from my database by
manage.py dumpdata > test.json
or
manage.py dumpdata --indent4 > test.json
I saw the json file it looks as it should.
then I truncate some tables and try to load them from JSON file
python manage.py loaddata database = T2 test.json // or without db name
I got
"UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: invalid start byte"
It I open the test.json file by notepad and save it as utf8 and try again then I have
"No JSON object could be decoded"
The file is still looks OK, not empty.
By the way when I open the json file by notepad it offers me to save it as Unicode. My database has UTF8 encoding. Please advice. Thank you.