Re: Problems with dumpdata/loaddata

2017-11-06 Thread Jani Tiainen
Hi. Maybe it would be useful to create ticket to document this behavior in Django documentation. 6.11.2017 8.21 ip. "Matthijs Kooijman" kirjoitti: > Hey folks, > > I'm replying to an old thread about a problem with "manage.py loaddata" > generating a BOM (byte-order-mark)

Re: Problems with dumpdata/loaddata

2017-11-06 Thread Matthijs Kooijman
Hey folks, I'm replying to an old thread about a problem with "manage.py loaddata" generating a BOM (byte-order-mark) that "manage.py dumpdata" refuses to load. I just ran into this same problem and found that, in my case, the problem is not "loaddata", but powershell which I was running

Re: Problems with dumpdata/loaddata

2016-04-09 Thread jorrit787
I jus tested it again and it happens even without opening the file in an editor first. Would that be a bug then? On Friday, April 8, 2016 at 10:23:43 AM UTC+2, Ramiro Morales wrote: > > It shouldn't. Are you sure you haven't opened and saved the json file with > a text editor that might be

Re: Problems with dumpdata/loaddata

2016-04-08 Thread Ramiro Morales
It shouldn't. Are you sure you haven't opened and saved the json file with a text editor that might be adding the BOM, e.g. Notepad before running loaddata? On Apr 7, 2016 9:17 PM, wrote: > Opening the JSON file in Notepad++ certainly gives some insight... It says > it's

Re: Problems with dumpdata/loaddata

2016-04-07 Thread jorrit787
Opening the JSON file in Notepad++ certainly gives some insight... It says it's encoded in USC-2 LE BOM. Converting it to UTF-8 with BOM in Notepad++ solves the problem. Question though, why does dumpdata create files with an encoding that can not be used out of the box with loaddata? -- You

Re: Problems with dumpdata/loaddata

2016-04-07 Thread ludovic coues
I believe the json file start with 0xff 0xfe, which mark the file as UTF-16. The problem is that these two character are invalid at the beginning of a json file. The problem have the same root for the xml. UTF-16 file but it pretend it is utf-8 encoded. These problems might go away on another OS

Re: Problems with dumpdata/loaddata

2016-04-06 Thread jorrit787
Thank you for the replies. *members* and *posts* are the names of my apps. The first line of the XML file when I open it in Notepad says: The JSON file has no distinguishable first line, it just starts right away with the data. On Wednesday, April 6, 2016 at 1:45:44 AM UTC+2,

Re: Problems with dumpdata/loaddata

2016-04-06 Thread Vijay Khemlani
Your apps are called members and posts, or those are the names of the models? On Wed, Apr 6, 2016 at 9:20 AM, ludovic coues wrote: > Both error look like encoding error. > In the JS file, it look like there is a byte order mark at the start > of the file. > The first line of

Re: Problems with dumpdata/loaddata

2016-04-06 Thread ludovic coues
Both error look like encoding error. In the JS file, it look like there is a byte order mark at the start of the file. The first line of both file might help to understand the error. 2016-04-06 1:45 GMT+02:00 : > I want to dump and load data for two apps that I have. Using

Re: Problems with dumpdata/loaddata

2008-10-02 Thread Russell Keith-Magee
On Thu, Oct 2, 2008 at 9:35 PM, Gary Thomas <[EMAIL PROTECTED]> wrote: > > I'm trying to use the admin interface to dump & restore my database, > without much luck. I can dump the data fine, but I've had no success > loading it back in. > > Could someone list the commands to do this? The actual