Python script is not running after python upgrade to 3.13

Python script is working fine from IDLE, but not working from UiPath studio :
Getting below error: XamlServices.Save(XamlWriter writer, Object instance)
at UiPath.Workflow.Operations.Serializer.Services.WorkflowXamlSerializer.SaveAsString(ActivityBuilder activityBuilder)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerWrapper.SaveSnapshot(String fileName), HResult -2147024894
06:25:11.8112 => [ERROR] [UiPath.Studio.Project] [1] System.IO.FileNotFoundException: Could not load file or assembly ‘UiPath.CodedWorkflows, Version=24.10.2.0, Culture=neutral, PublicKeyToken=null’. The system cannot find the file specified.
File name: ‘UiPath.CodedWorkflows, Version=24.10.2.0, Culture=neutral, PublicKeyToken=null’
at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(MetadataToken caCtorToken, MetadataImport& scope, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1& derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctorWithParameters, Boolean& isVarArg)
at System.Reflection.CustomAttribute.AddCustomAttributes(ListBuilder`1& attributes, RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, ListBuilder`1 derivedAttributes)
at System.Attribute.GetCustomAttributes(Assembly element, Type attributeType, Boolean inherit)

error from studio is : one or more errors occurred.

Studio version :23.4.6
Python version :3.13

same script is working fine for 3.12

UiPath.CodedWorkflows.24.10.2 that cannot be resolved in your case requires UiPath Studio 24.10 and up.

Try upgrading the Robot and Studio to 24.10.24 using this link https://download.uipath.com/versions/24.10.24/UiPathStudio.msi and retry the project execution.

For the UiPath packages to be found, make sure you are using these feeds https://pkgs.uipath.com/official/index.json and https://pkgs.dev.azure.com/uipath/Public.Feeds/_packaging/UiPath-Official/nuget/v3/index.json

There are two separate issues. The error in your log isn’t from Python.

1. The CodedWorkflows error: UiPath.CodedWorkflows 24.10.2 needs Studio/Robot 24.10 or newer. Either upgrade Studio, or downgrade that package in Manage Packages to match your Studio. Then delete the project’s .local folder and reopen the project.

2. Python 3.13: In Python Scope, set Path to the 3.13 install folder, Library path to python313.dll, Target to x64, and Version to Auto. Update UiPath.Python.Activities to the latest version; if it doesn’t list 3.13, stay on 3.12 for now. Also reinstall your modules with pip, because upgrading Python doesn’t carry them over.

If it still fails, post your Studio version, your Python.Activities version, and the exact error.

Hi @rajasekhar_d ,
Python 3.13 is likely not fully supported by your Studio version. Downgrading to Python 3.12 or upgrading UiPath Studio/packages to a version that supports Python 3.13 should resolve the issue.

Thanks