Hello, I’m having issues running pyhamilton for the first time. Whenever I try to run the “HSLHttp - Initialize” command, I run into the “Class is not registered” error below.
I’ve run the pyhamilton-configure.exe file numerous times and checked install locations. The HSLHttp files are located here: C:\Program Files (x86)\HAMILTON\Library\HSLHttp
All other installers seemed to work fine. The only one I had trouble with was the HSLJson installer. I have multiple copies of all the HSLJson files throughout the C:\Program Files (x86)\HAMILTON\Library folder. If someone could confirm where these need to be, I can clean up my system lol. These are the locations where I have them:
Below is the robot_method.py file I’m running. The python debugger shows “Normal Logging - Passed”, but no other print functions.
# -*- coding: utf-8 -*-
"""
Created on Sun Jul 17 21:12:47 2022
@author: stefa
"""
import os
from pyhamilton import (HamiltonInterface, LayoutManager,
Plate96, Tip96, initialize, tip_pick_up, tip_eject,
aspirate, dispense, oemerr, resource_list_with_prefix, normal_logging,
layout_item)
liq_class = 'StandardVolumeFilter_Water_DispenseJet_Empty'
project_path = r'C:\Users\[username]\AppData\Local\Programs\Python\Python38-32\Scripts\new-project'
lmgr = LayoutManager(project_path + '\deck.lay')
plates = resource_list_with_prefix(lmgr, 'plate_', Plate96, 5)
tips = layout_item(lmgr, Tip96, 'tips_0')
liq_class = 'StandardVolumeFilter_Water_DispenseJet_Empty'
aspiration_poss = [(plates[0], x) for x in range(8)]
dispense_poss = [(plates[0], x) for x in range(8,16)]
vols_list = [100]*8
tips_poss = [(tips, x) for x in range(8)]
if __name__ == '__main__':
with HamiltonInterface(simulate=True) as ham_int:
normal_logging(ham_int, os.getcwd())
print("Normal Logging - Passed")
initialize(ham_int)
print("Initialize - Passed")
tip_pick_up(ham_int, tips_poss)
print("Tip Pick Up - Passed")
aspirate(ham_int, aspiration_poss, vols_list, liquidClass = liq_class)
print("Aspirate - Passed")
dispense(ham_int, dispense_poss, vols_list, liquidClass = liq_class)
print("Dispense - Passed")
tip_eject(ham_int, tips_poss)
print("Tip Eject - Passed")