I’m currently in the process of pre-validating/bugfinding a method. And figured I would be prudent and keep the files separate and chose to into a folder named /for_testing/ with subfolders named Method, Library and Labware respectively.
But at runtime the method starts spitting out these errors “2026-02-11 13:40:12> SYSTEM : Analyze method - progress; C:\Program Files (x86)\HAMILTON\Library\HSLMETEDLib.hs_(65) : error 1303: identifier ‘FormatErrorLocation’ has already been defined”
For some reason Analyze seems to check the files in the “./Library/”-folder instead of “./for_testing/Library/”.
Anyone got an idea why this is the case?
Hi @henrikvestin_ubb ,
HSLMETEDLib.hs_ is a default library that many functions utilize in the background. Such as the ML_STAR commands. There can only be one instance of this kind of library loaded.
Did you copy all of the libraries into the for_testing folder? If so, what can happen is VENUS will search for the libraries within the default directories and can get confused if it finds the same name in multiple locations. This is because libraries are loaded into the method as relative paths and can be referenced inside other libraries with the full path leading to two instances trying to load.
To prevent this kind of error, I would strongly recommend not using a temporary folder for methods/libraries and instead utilize function protection and file validation.
Thank I’ll try out function protection.
My reasoning to import the method and libraries to a testing_folder was because I have refactored a couple of custom HSL-functions and didn’t want to these to mess with the ones already there.
Hi @henrikvestin_ubb ,
As long as the namespace and file name of the library are changed (for the customized libraries), then you won’t run into any issues.
During testing that will work just fine, thanks for the tip.
If someone really want to have methods, libs and labware in a separate folder during testing, you can edit the hsl file for the method.
- Open in text editor or in Hamilton HSL method editor.
- You’ll see the included libs with the correct path, past those and the declared variables you’ll see “namespace _Method” mentioned again for HSLMETEDLib, HSLMECCLib, HSLTPLLib and HSLSTCCLib.
- Add the path in front of the filename. Should look something like this
namespace _Method { #include "C:\\Program Files (x86)\\Hamilton\\For_method_testing\\Library\\HSLMETEDLib.hs_" }
Beware that if you edit and save your method after changing the path it will revert back to the default path.


