Method contains syntax errors

Glad you’re up and running! I have it working on the computer that’s connected directly to my instrument, but I’m having issues with my laptop. I got the checksum error below as you did, but when I disable checksums I get another error telling me the method contains syntax errors. Not too sure what’s happening but I think I’ll just have to stick to testing on the master PC for now!



Syntax errors are almost always due to missing library files. Check the trace to see exactly whats missing.

1 Like

Hey Stefan! Firstly, thanks for all your help on PyHamilton. I’m slowing getting up to speed! I’m in the process of trying to run simulations using my instrument’s real deck layout. I’ve gotten another syntax error which I’m not sure how to handle. The trace is as follows:

I’m not sure what is causing this error. I’m not doing anything with the waste in the Python script. I changed the name of the waste in the .lay file to “Waste_123”, but that did not change the error message (it still says “Waste”). Have you come across this before?

I tried copy/pasting any missing libraries from my instrument onto my laptop but that has not worked either :slight_smile:

Can you share the code that produced this error? That would be immensely helpful.

looks like the layout that you defined doesn’t have a waste position. i would check your .lay file.

1 Like

So I managed to get the code to work. The waste position was present, but it was lacking a sequence called “Waste”. Everything fell into place upon created of the waste sequence.

Stefan, could I have some clarification regarding the necessity of sequences in PyHamilton? They seem to be ignored for the most part! I guess the waste sequence is probably something required by Hamilton :slight_smile:


“Waste” is one of the few (if not the only) sequences that must be specified in the .layfile, as it is the default sequence we eject tips to if one is not provided. Most .layfiles have this sequence by default.

Most commands in PyHamilton work by creating sequences on the fly based on the set of wells specified. You can also directly reference sequences in commands, but I don’t usually do this. I almost never have a need to define any sequences beyond what is provided by default in a .layfile.