ERROR: Unable to load custom reporting console.
When trying to open the Statseeker GUI Reporting console you get an error.
Checking the python log shows the file that can not be loaded.
Error Message
2023 / 12 / 06 14 : 58 : 50 | 23055 | crmenu | ERROR | Error opening file '/home/statseeker/nim/etc/customreports/custom-report-list-admin.cfg' |
To fix this:
- Go to the custom reports directoty cd /home/statseeker/nim/etc/customreports
- Test the file by cat-ing it into the JSON parser
- This example shows an extra bracket at column 38158 which is the end of the line (EOF).
- cat custom-report-list-admin.cfg | jq .
Error Message
jq: parse error: Unmatched '}' at line 1 , column 38158 |
Using vi to delete this extra bracket fixed the issue.
If the file is very broken an option is to replace the file with one extracted from a backup:
tar --strip-components=5 -xvf 657003B2.bkp home/statseeker/nim/etc/customreports/custom-report-list-admin.cfg
N.B. If restoring from backup remember to fix ownership and permissions if necessary,
I also suggest moving the corrupt file to a backup file
e.g. statseeker $ mv custom-report-list-admin.cfg custom-report-list-Marilyn.cfg.bkup