jxeeno/aust-govt-covid19-vaccine-pdf

failed to pull xxx

Madff386 opened this issue · 3 comments

I'm not very experienced with js but when running a local copy, for the last few days when I run the fetch-and-store.js file I have been getting a message saying Failed to pull VIC and also Failed to pull WA and when I look in the .json file there is no doses breakdown for wa or vic just in the validation it says they are null.
{ "success": false, "url": "https://www.health.gov.au/sites/default/files/documents/2021/07/covid-19-vaccine-rollout-update-27-july-2021.pdf", "pdfData": { "dataAsAt": "2021-07-26", "totals": { "national": { "total": 11396784, "last24hr": 185337 }, "cwthAll": { "total": 6414568, "last24hr": 107525 }, "cwthPrimaryCare": { "total": 5909489, "last24hr": 103516 }, "cwthAgedCare": { "total": 505079, "last24hr": 4009 } }, "stateClinics": { "VIC": { "total": 1553105, "last24hr": 23273 }, "QLD": { "total": 862398, "last24hr": 10212 }, "WA": { "total": 462044, "last24hr": 7439 }, "TAS": { "total": 155492, "last24hr": 2039 }, "SA": { "total": 365814, "last24hr": 6331 }, "ACT": { "total": 127438, "last24hr": 2249 }, "NT": { "total": 85419, "last24hr": 1410 }, "NSW": { "total": 1370506, "last24hr": 24859 } }, "cwthAgedCare": { "VIC": { "total": 134256, "last24hr": 692 }, "QLD": { "total": 90487, "last24hr": 553 }, "WA": { "total": 44411, "last24hr": 689 }, "TAS": { "total": 17351, "last24hr": 300 }, "SA": { "total": 40139, "last24hr": 288 }, "ACT": { "total": 7699, "last24hr": 0 }, "NT": { "total": 3521, "last24hr": 28 }, "NSW": { "total": 167215, "last24hr": 1459 } }, "cwthPrimaryCare": { "VIC": { "total": 1463441, "last24hr": 24376 }, "QLD": { "total": 1205399, "last24hr": 16422 }, "WA": { "total": 538157, "last24hr": 8339 }, "TAS": { "total": 132274, "last24hr": 1307 }, "SA": { "total": 410976, "last24hr": 5277 }, "ACT": { "total": 100652, "last24hr": 2086 }, "NT": { "total": 46634, "last24hr": 631 }, "NSW": { "total": 2011956, "last24hr": 45078 } }, "cwthAgedCareBreakdown": { "cwthAgedCareDoses": { "firstDose": 276438, "secondDose": 228641 }, "cwthAgedCareFacilities": { "firstDose": 2572, "secondDose": 2586 } }, "doseBreakdown": { "national": [ { "ageLower": 95, "firstDoseCount": 38896, "firstDosePct": 73.5, "secondDoseCount": 26459, "secondDosePct": 50, "femalePct": 75.4, "malePct": 68.6 }, { "ageLower": 90, "ageUpper": 94, "firstDoseCount": 124174, "firstDosePct": 78.4, "secondDoseCount": 73943, "secondDosePct": 46.7, "femalePct": 78.1, "malePct": 78.7 }, { "ageLower": 85, "ageUpper": 89, "firstDoseCount": 244884, "firstDosePct": 77.4, "secondDoseCount": 127714, "secondDosePct": 40.4, "femalePct": 76, "malePct": 79.4 }, { "ageLower": 80, "ageUpper": 84, "firstDoseCount": 414639, "firstDosePct": 78.5, "secondDoseCount": 205735, "secondDosePct": 38.9, "femalePct": 76.6, "malePct": 80.6 }, { "ageLower": 75, "ageUpper": 79, "firstDoseCount": 613219, "firstDosePct": 79.3, "secondDoseCount": 291631, "secondDosePct": 37.7, "femalePct": 78.2, "malePct": 80.3 }, { "ageLower": 70, "ageUpper": 74, "firstDoseCount": 838092, "firstDosePct": 75.8, "secondDoseCount": 372874, "secondDosePct": 33.7, "femalePct": 75.7, "malePct": 75.8 }, { "ageLower": 65, "ageUpper": 69, "firstDoseCount": 841235, "firstDosePct": 66.9, "secondDoseCount": 203785, "secondDosePct": 16.2, "femalePct": 66.7, "malePct": 66.9 }, { "ageLower": 60, "ageUpper": 64, "firstDoseCount": 865790, "firstDosePct": 60.3, "secondDoseCount": 211633, "secondDosePct": 14.7, "femalePct": 60.7, "malePct": 59.7 }, { "ageLower": 55, "ageUpper": 59, "firstDoseCount": 793357, "firstDosePct": 51, "secondDoseCount": 233750, "secondDosePct": 15, "femalePct": 52.3, "malePct": 49.6 }, { "ageLower": 50, "ageUpper": 54, "firstDoseCount": 742367, "firstDosePct": 47.4, "secondDoseCount": 232285, "secondDosePct": 14.8, "femalePct": 49, "malePct": 45.7 }, { "ageLower": 45, "ageUpper": 49, "firstDoseCount": 652672, "firstDosePct": 38.9, "secondDoseCount": 405281, "secondDosePct": 24.2, "femalePct": 41.2, "malePct": 36.5 }, { "ageLower": 40, "ageUpper": 44, "firstDoseCount": 593946, "firstDosePct": 36.7, "secondDoseCount": 358509, "secondDosePct": 22.1, "femalePct": 38.8, "malePct": 34.4 }, { "ageLower": 35, "ageUpper": 39, "firstDoseCount": 345257, "firstDosePct": 18.8, "secondDoseCount": 206399, "secondDosePct": 11.2, "femalePct": 20.4, "malePct": 17.1 }, { "ageLower": 30, "ageUpper": 34, "firstDoseCount": 312001, "firstDosePct": 16.2, "secondDoseCount": 188268, "secondDosePct": 9.8, "femalePct": 17.6, "malePct": 14.7 }, { "ageLower": 25, "ageUpper": 29, "firstDoseCount": 268994, "firstDosePct": 14.1, "secondDoseCount": 168963, "secondDosePct": 8.9, "femalePct": 16.5, "malePct": 11.5 }, { "ageLower": 20, "ageUpper": 24, "firstDoseCount": 192067, "firstDosePct": 11.2, "secondDoseCount": 112392, "secondDosePct": 6.6, "femalePct": 14.2, "malePct": 8.3 }, { "ageLower": 16, "ageUpper": 19, "firstDoseCount": 52334, "firstDosePct": 4.4, "secondDoseCount": 24840, "secondDosePct": 2.1, "femalePct": 5.2, "malePct": 3.6 } ], "AUS": [ { "ageLower": 16, "firstDoseCount": 7933924, "firstDosePct": 38.48, "secondDoseCount": 3444461, "secondDosePct": 16.7, "cohortPopulation": 20619959 }, { "ageLower": 50, "firstDoseCount": 5516653, "firstDosePct": 63.05, "secondDoseCount": 1979809, "secondDosePct": 22.63, "cohortPopulation": 8749703 }, { "ageLower": 70, "firstDoseCount": 2273904, "firstDosePct": 77.48, "secondDoseCount": 1098356, "secondDosePct": 37.43, "cohortPopulation": 2934706 } ], "ACT": [ { "ageLower": 16, "firstDoseCount": 186533, "firstDosePct": 54.22, "secondDoseCount": 87180, "secondDosePct": 25.34, "cohortPopulation": 344037 }, { "ageLower": 50, "firstDoseCount": 106887, "firstDosePct": 83.63, "secondDoseCount": 38076, "secondDosePct": 29.79, "cohortPopulation": 127802 }, { "ageLower": 70, "firstDoseCount": 38041, "firstDosePct": 95.23, "secondDoseCount": 20233, "secondDosePct": 50.65, "cohortPopulation": 39946 } ], "NSW": [ { "ageLower": 16, "firstDoseCount": 2478220, "firstDosePct": 37.75, "secondDoseCount": 1071895, "secondDosePct": 16.33, "cohortPopulation": 6565651 }, { "ageLower": 50, "firstDoseCount": 1722839, "firstDosePct": 61.36, "secondDoseCount": 668168, "secondDosePct": 23.8, "cohortPopulation": 2807793 }, { "ageLower": 70, "firstDoseCount": 734495, "firstDosePct": 76.3, "secondDoseCount": 364017, "secondDosePct": 37.82, "cohortPopulation": 962606 } ], "NT": [ { "ageLower": 16, "firstDoseCount": 88759, "firstDosePct": 46.58, "secondDoseCount": 50605, "secondDosePct": 26.55, "cohortPopulation": 190571 }, { "ageLower": 50, "firstDoseCount": 40700, "firstDosePct": 65.35, "secondDoseCount": 19940, "secondDosePct": 32.02, "cohortPopulation": 62280 }, { "ageLower": 70, "firstDoseCount": 9431, "firstDosePct": 76.41, "secondDoseCount": 6446, "secondDosePct": 52.22, "cohortPopulation": 12343 } ], "QLD": [ { "ageLower": 16, "firstDoseCount": 1468237, "firstDosePct": 35.7, "secondDoseCount": 681859, "secondDosePct": 16.58, "cohortPopulation": 4112707 }, { "ageLower": 50, "firstDoseCount": 1058153, "firstDosePct": 60.16, "secondDoseCount": 423644, "secondDosePct": 24.09, "cohortPopulation": 1758855 }, { "ageLower": 70, "firstDoseCount": 451164, "firstDosePct": 78.09, "secondDoseCount": 230929, "secondDosePct": 39.97, "cohortPopulation": 577767 } ], "SA": [ { "ageLower": 16, "firstDoseCount": 564674, "firstDosePct": 39.2, "secondDoseCount": 244916, "secondDosePct": 17, "cohortPopulation": 1440400 }, { "ageLower": 50, "firstDoseCount": 409660, "firstDosePct": 60.75, "secondDoseCount": 142167, "secondDosePct": 21.08, "cohortPopulation": 674384 }, { "ageLower": 70, "firstDoseCount": 182679, "firstDosePct": 75.95, "secondDoseCount": 81388, "secondDosePct": 33.84, "cohortPopulation": 240514 } ], "TAS": [ { "ageLower": 16, "firstDoseCount": 204527, "firstDosePct": 46.47, "secondDoseCount": 96413, "secondDosePct": 21.9, "cohortPopulation": 440172 }, { "ageLower": 50, "firstDoseCount": 150996, "firstDosePct": 68.62, "secondDoseCount": 62626, "secondDosePct": 28.46, "cohortPopulation": 220036 }, { "ageLower": 70, "firstDoseCount": 63542, "firstDosePct": 82.36, "secondDoseCount": 34358, "secondDosePct": 44.53, "cohortPopulation": 77155 } ] } }, "validation": [ "doseBreakdown.VIC[0].firstDoseCount is null", "doseBreakdown.VIC[0].firstDosePct is null", "doseBreakdown.VIC[0].secondDoseCount is null", "doseBreakdown.VIC[0].secondDosePct is null", "doseBreakdown.VIC[0].cohortPopulation is null", "doseBreakdown.WA[0].firstDoseCount is null", "doseBreakdown.WA[0].firstDosePct is null", "doseBreakdown.WA[0].secondDoseCount is null", "doseBreakdown.WA[0].secondDosePct is null", "doseBreakdown.WA[0].cohortPopulation is null", "doseBreakdown.VIC[1].firstDoseCount is null", "doseBreakdown.VIC[1].firstDosePct is null", "doseBreakdown.VIC[1].secondDoseCount is null", "doseBreakdown.VIC[1].secondDosePct is null", "doseBreakdown.VIC[1].cohortPopulation is null", "doseBreakdown.WA[1].firstDoseCount is null", "doseBreakdown.WA[1].firstDosePct is null", "doseBreakdown.WA[1].secondDoseCount is null", "doseBreakdown.WA[1].secondDosePct is null", "doseBreakdown.WA[1].cohortPopulation is null", "doseBreakdown.VIC[2].firstDoseCount is null", "doseBreakdown.VIC[2].firstDosePct is null", "doseBreakdown.VIC[2].secondDoseCount is null", "doseBreakdown.VIC[2].secondDosePct is null", "doseBreakdown.VIC[2].cohortPopulation is null", "doseBreakdown.WA[2].firstDoseCount is null", "doseBreakdown.WA[2].firstDosePct is null", "doseBreakdown.WA[2].secondDoseCount is null", "doseBreakdown.WA[2].secondDosePct is null", "doseBreakdown.WA[2].cohortPopulation is null" ] }
I don't know what is causing it.
covid-19-vaccine-rollout-update-27-july-2021.pdf there doesnt seem to be any values missing from the pdf.
I'm running it on a raspberrypi 4b with a rasbian 10 operating system if that helps.

Hey there, do you have the latest version of the code on your local copy? The format of the PDF changed slightly which meant we had to modify the code a little to extract the data.

Thanks, it is working now. I did need to do it twice because they changed it again.
Also, thanks for being so quick to update your code base, it is saving me a lot of time.

All good, glad to hear it's working! Will close for now :)