How to overcome the runtime error x, x, x, x is not a valid value for Int32. (Parameter 'value') in UiPath Studio?
Issue Description:
In some of the workflows, the UiPath Studio can throw this runtime execution error for Invoke Workflow File activities with at least one Application Card and/or an Extract Table Data activity.
Message: x, x, x, x is not a valid value for Int32. (Parameter 'value')
Exception Type: System.ArgumentException
in SEQUENCE_NAME.xaml at InvokeWorkflowFile "SEQUENCE_NAME- Invoke Workflow File (SEQUENCE_NAME.xaml)" at Sequence "SEQUENCE_NAME" at Sequence "SEQUENCE_NAME"
System.ArgumentException: x, x, x, x is not a valid value for Int32. (Parameter 'value') —> System.FormatException: The input string ' x, x, x, x' was not in a correct format. at System.Number.ThrowFormatException[TChar](ReadOnlySpan1 value) at System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider) at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo) at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) --- End of inner exception stack trace --- at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) at System.Drawing.RectangleConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) at BlankProcess80.Main.GetImplementation() at System.Activities.Activity.OnInternalCacheMetadata(Boolean createEmptyBindings) at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors)
at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors) at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.WorkflowApplication.EnsureInitialized()
at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)
at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)
at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)
at UiPath.Executor.Core.Runners.WorkflowInProcessRunner.<>c__DisplayClass7_0.<BeginExecute>g__StartWorkflow|1()
at UiPath.Executor.Core.Runners.WorkflowInProcessRunner.BeginExecute(AsyncCallback callback, Object state)
at UiPath.Core.Activities.ExecutorInvokeActivity.BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, Object state)
at System.Activities.AsyncCodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Cause:
The runtime error occurred because the input string 'x, x, x, x' was incorrectly interpreted as a single value, rather than a list of integers. This is likely due to the current CultureInfo settings, which affect how strings are parsed - particularly when dealing with number formats. If the culture uses a comma as a decimal or list separator differently than expected, it can lead to a FormatException when attempting to convert the string to an Int32. Ensuring that the correct CultureInfo is set before parsing or assigning values can prevent this issue.
More details can be found at CultureInfo.CurrentUICulture Property.
Resolution:
Try these alternative solutions in your impacted UiPath Studio workflows:
Approach #1
Reset the CultureInfo settings to the default (en-US) in all workflows where needed (especially before the impacted Invoke Workflow File activities which have at least one Application Card and/or and Extract Table Data activity) and retry the workflow execution(s).
Variable:
System.Threading.Thread.CurrentThread.CurrentCulture
Value:
new CultureInfo("en-US")
Approach #2
Disable or remove the impacted Assign activities with value new CultureInfo("xx-XX ") in case you used them and retry the workflow execution(s).
How to check the current CultureInfo of your UiPath Studio workflow?
Add a Log Message activity with this message:
System.Globalization.CultureInfo.CurrentCulture.DisplayName
Sample results:
![]()
or
System.Globalization.CultureInfo.CurrentCulture.Name
![]()

