[Solved] Check sum verification of file failed

Hi all,

I came across this error when I was trying to save my method after using a HSL code on the Method Editor.

Screen Shot 2023-10-31 at 9.41.12 PM

This error occurred after I made a change in one of my HSL code blocks and tried saving the method. What happened was that the first time I made a change to the code black, it gave me a syntax error. After I fixed the syntax error, I couldn’t save my method since this error popped up. So, I closed the program in hope of “restarting” my method but I can’t even access the method file anymore.

From what I could understand from related topics, I tried to disable checksum verification on the System Configuration Editor but it did not resolve the issue and, instead gave me another error. I hope I did not lose my method. :grimacing:

Any help appreciated,
Nat

1 Like

I may be wrong in this, but when you made the change to the HSL counterpart of your method .med, the HSL method editor regenerated the checksum for that file, but your .med will still expect the old checksum, as it doesn’t know you have edited the HSL.

If you were to save the .med again, it will overwrite your edited HSL file. There are a few options available to you, such as making a new HSL file and importing that into your .med, or writing HSL in the .med itself, but what is better depends on your usage.

@Gareth

Thank you for insight on the issue at hand. The only thing that is different from what you explained is that I was writing the HSL code directly in my .med file, which resulted in this error. So, by the logic you explained, if I were to save .hsl file again, the edited .med file will be overwritten?

-Nat

Oh, you wrote the HSL code in the med file? In that case you shouldn’t need to edit the HSL file then? I think the med updates the HSL file, but not the other way around, which is causing the mismatch.
Gareth

@Gareth

I see. In that case, then I still do not know how to resolve this issue because I cannot open the .med file anymore cause the checksum verification error keeps popping up.

-Nat

Hi @Nat,

Disable the checksum verification option in the System Configuration Editor under Security Settings, then try opening the method. If you don’t need Checksum Verification, then you can leave it disabled. Otherwise, make a change to the method, Save it, then turn Checksum Verification back on.

Thank you,
Dan

2 Likes

Hi @DanHartman_Hamilton

Thank you for the response. I disabled the Checksum verification and tried to open the .med file on the Method Editor and received this error instead, which still prevents me from opening the .med file.

-Nat

This Data Definition error occurs when a key pairing is lost between the .med file and the .hsl file (or other supporting files required to make a method work). The best way to resolve this issue is to restore the method files from a backup, typically a package file that is exported during the programming process. Backing up regularly is highly suggested to avoid issues like these as well as be able to recover from problems that might occur in or outside of VENUS.

Thank you,
Dan

3 Likes

I know I’m late to the game, but I wanted to add to this.

Without your Method and exact copy of the HSL block you used to confirm, it sounds like you had an instance where an extra bracket was used ({ or }) or some other delimiter used by VENUS code analysis during the changes to the HSL Block. For example, leaving an un-paired open or closed bracket can make the parser think you’re closing off an outer block (such as Main) or leaving the HSL with an open block that results in mismatched code blocks. Since this essentially injects a direct copy of the HSL into the background HSL file, this can result in a Method that fails syntax checks and essentially corrupts the Method Editor’s ability to read the file to match the Step specific metadata. Once this is done, it can break the Method even after making the correction, if the HSL itself is now in a state of mismatched groupings.

Usually you can open the HSL file in HSL Method Editor directly and find the mistake, correct it, and save the HSL to make the Method functional again. It could be a missing semicolon, extra open/close parenthesis, or extra open/close bracket.

*Note: Adding to this, generally Method Editor can catch most HSL mistakes made, including a mismatched set of brackets, but it’ll only discard your entire HSL block if it’s a critical mistake. If it’s just a semicolon or bracket, it will provide the error and expect you to correct it, but if you choose to Cancel instead, the incorrect code remains in the HSL Step and once that is saved and parsed, it may corrupt the Method. The actual implications depend on what the final HSL looks like when the code you created in the step is injected into the auto-generated HSL of the Method.

Thank you,
William

4 Likes

I don’t recall the details of what happened since it was a while ago and it happened so fast, but I’m sure that is what happened to my method when adding I was the HSL code :grimacing:

Thank you for the in-depth explanation of how the method and HSL file interact with one another!

-Nat

1 Like

This just saved my method! Thank you :face_holding_back_tears:

2 Likes