I am not able to repeat this error. I was able to run the following code using the "Training - AP1 i02 - Detailed Sizing" project that ships in the Training database. You can import this project from the training database to your own database (File | Import). I was also able to run this code when component was initially a One Stack concept.
def main(databasePath, projectName):
hs, project = OpenHyperSizerProject(databasePath, projectName)
component = project.Components.GetComponent(52)
groupId = component.GroupId
group = project.Groups.GetGroup(groupId)
conceptId = BeamPanelConcept.bpcBlade
variableId = VariableParameterDefinition.vpdWeb_ThicknessMaterial
# Set concept.
group.SetConcepts(conceptId)
print (groupId)
# Set variables.
variables = group.Variables
variable = variables.GetVariable(conceptId, variableId)
variable.MinBound = 0.1
variable.MaxBound = 0.6
variable.StepSize = 0.12
variables.Save()
In your exception it lists "COMObject GetGroup" as the error location yet the the message indicates the error occurs in Group.Save() (called when using variables.Save()). Perhaps this line in an issue:
group = hs.Projects(1).Groups.GetGroup(component)
When calling GetGroup() you need to pass in the component ID not the component object itself.
The error message also indicates that it's trying to save
material variables, yet in the code I don't see you modifying any materials.
Can you run the attached code? Perhaps it will help identify the issue in your code.
-Ryan