-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error PKG-1 when file not found #149
Comments
Hi @maria-messerschmidt I'll look at this soon, I assume it's when the CLI app is used. I'd agree that a clear message should be sent when either:
I'll look to produce a candidate fix for next week if you concur. |
Thanks! Let me get back to you tomorrow. I managed to get a "File does not exist" error, so I need to figure out under what circumstances it works and doesn't work. |
Ok, so this only happens, when I run the validator with -p (but of course, I use that in most cases). I think the error produced when running it without -p is fine, it just needs to also produce the error when running with -p. C:\odf\odf-validator-main>odf-validator.bat "filer/testfiler/xxx.ods" C:\odf\odf-validator-main>odf-validator.bat -p filer/testfiler/xxx.ods" |
OK, that looks a straightforward fix, and possibly a little refactor to get the option thing in line. |
Hi @maria-messerschmidt there is now a PR that fixes this issue. If you want to take a look and test its #158 |
Fix is working for this issue. I now get the same error message whether I run it with or without -p. C:\odf\odf-validator-fix-missing-file-profile>odf-validator.bat -p testfiler/T001.ods C:\odf\odf-validator-fix-missing-file-profile>odf-validator.bat testfiler/T001.ods I can see in the changes to CliValidator that you aligned the checks for with/without profile for the FileNotFound exception. But I noticed that the IOException (which was moved to line 82) is not identical to the equivalent line for running the validator without the profile (line 71) which contains three exceptions (ParserConfigurationException | SAXException | IOException). I have not managed to trigger any of these exceptions, but I was wondering whether there is a reason for the discrepancy? |
When the validator is executed, and the file is not found, an error is thrown. But the error message is:
PKG-1: alm.ods [ERROR] An OpenDocument Package shall be a well formed Zip Archive.
POL-2: alm.ods [ERROR] Standard Compliance | The file MUST comply with the standard "OASIS Open Document Document Format for Office Applications (OpenDocument) v1.3".
This is somewhat misleading when the file does in fact not exist.
The text was updated successfully, but these errors were encountered: