incomplete JSON export

DiscussieBug Collectors

Sluit je aan bij LibraryThing om te posten.

incomplete JSON export

1legallypuzzled
mei 21, 2021, 6:18 am

Exporting has recently been problematic (here and here) but neither of those reports seemed to indicate problems with the JSON export.

I'm missing the first 600 books I cataloged in my JSON export. There's a few lines of curly brackets to begin the file ("{},},},},},}"), and then the file contains almost all the books I've cataloged since October 21, 2006, but none before. It's missing sixteen books I cataloged on that date as well. Sorting my catalog by date entered shows the first book in the export is exactly book #601 in my catalog.

I use Pale Moon (29.2) as my browser on Win10, but this also occurs on Firefox 88.0.1. I tried to export a few different times yesterday, thinking it was perhaps a "server busy"-type problem, but all the downloads were essentially the same. (I even tried breaking up the export into collections, but that still couldn't find those first 600 books.)

2Foretopman
mei 21, 2021, 9:10 am

>1 legallypuzzled: Confirming (sort of). My JSON export skips the first 200 books, and starts with book #201. Vivaldi/Win10

3ccatalfo
mei 21, 2021, 10:25 am

Sorry about this - we did not see this in our testing.

We'll circle back and take a look to figure out what's going on there.

4lorax
mei 21, 2021, 12:04 pm

Not only am I missing the first 300 books (the fact that we're all missing an even hundred, rather than a date range, suggests the chunker is falling down) but what I do get is malformed json, presumably because it's missing the beginning stuff.

So your testing didn't include "test to make sure the export file has the correct number of records"?

5gcthomas
mei 23, 2021, 4:21 am

I'm also getting malformed JSON. The file starts with

{
},
},"195926004": {

The rest of the data looks OK from line 3 on. All books with ids less than 195926004 (the first 200 books) are omitted.

6antqueen
mei 28, 2021, 5:33 pm

Any updates on this?

7timspalding
mei 28, 2021, 8:58 pm

Oh, yes, I believe that Chris fixed this. I'm going download your export and see if I'm right.

8timspalding
mei 28, 2021, 8:59 pm

9timspalding
mei 28, 2021, 9:05 pm

Nope. Drat. Still missing some at the beginning. Dropping this on ccatalfo to see what's up.

10antqueen
mei 30, 2021, 2:04 pm

I'll confirm that it's still happening. In case it helps, my missing ones don't seem to be at the beginning, or at least aren't all at the beginning. I get 2438 of the 3938 it says it exported, and there were several malformed areas (all an extra }, at the beginning of a line) scattered throughout the file.

11ccatalfo
jun 1, 2021, 8:47 am

Hi all - sorry for the delay on this.

It appears that this was an issue with character encoding in some users' data which caused the JSON exports to fail in some cases.

I've switched some code to hopefully handle these better and re-tested each of your exports and I got complete, valid record sets in each case.

Let us know if you still see problems.

12Foretopman
Bewerkt: jun 1, 2021, 12:07 pm

>11 ccatalfo: Sorry, it still doesn't appear to work. It starts with a single "empty" entry "{ }," and skips the first 200 books. Interestingly, it skips 200 books whether I'm exporting all books or just my "Physical Books" collection, which means different books get skipped.

ETA: It occurred to me that it might not be a coincidence that it skips 200 books and I'm also displaying 200 books per page on my "Your books" tab. So I changed that setting to display 30 books per page and did another JSON download. No difference; it still skips the first 200 books.

13ccatalfo
jun 1, 2021, 12:44 pm

>12 Foretopman: Ok - thanks i'll take a look at yours now.

14ccatalfo
jun 1, 2021, 2:15 pm

>12 Foretopman: Ah, sorry, this was a case of long running job not getting the code update.

If you try now, it should work.

(And i've amended the code to restart itself periodically for future code updates.)

15legallypuzzled
Bewerkt: jun 1, 2021, 7:28 pm

Confirming it works; all books are now included. Thanks!

16Foretopman
jun 1, 2021, 10:21 pm

>14 ccatalfo: Thanks, it looks good!

17antqueen
jun 2, 2021, 10:53 am

Mine's good now too. Thanks!

18bnielsen
jun 2, 2021, 6:30 pm

>14 ccatalfo: Thanks. And 2xThanks for the explanation!