diff --git a/src/backend/base/langflow/components/processing/json_cleaner.py b/src/backend/base/langflow/components/processing/json_cleaner.py index 87b11aa79..93c193ae6 100644 --- a/src/backend/base/langflow/components/processing/json_cleaner.py +++ b/src/backend/base/langflow/components/processing/json_cleaner.py @@ -97,7 +97,7 @@ class JSONCleaner(Component): raise ValueError(msg) from e return s - def __init__(self): + def __init__(self, *args, **kwargs): # Create a translation table that maps control characters to None - super().__init__() + super().__init__(*args, **kwargs) self.translation_table = str.maketrans("", "", "".join(chr(i) for i in range(32)) + chr(127)) diff --git a/src/backend/base/langflow/components/tools/calculator.py b/src/backend/base/langflow/components/tools/calculator.py index 26fd9077a..8bd38d756 100644 --- a/src/backend/base/langflow/components/tools/calculator.py +++ b/src/backend/base/langflow/components/tools/calculator.py @@ -91,8 +91,8 @@ class CalculatorToolComponent(LCToolComponent): self.status = error_message return [Data(data={"error": error_message, "input": expression})] - def __init__(self): - super().__init__() + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) self.operators = { ast.Add: operator.add, ast.Sub: operator.sub,