# Error when Loading Python Code

**URL:** <https://forum.uipath.com/t/error-when-loading-python-code/100875>\
**Category:** Help\
**Tags:** python, activities\
**Created:** [March 8, 2019, 8:49pm UTC](https://forum.uipath.com/t/error-when-loading-python-code/100875 "2019-03-08T20:49:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Prieto\_Abas](https://avatars.discourse-cdn.com/v4/letter/j/6de8d8/32.png) [@Jonathan\_Prieto\_Abas](https://forum.uipath.com/u/Jonathan_Prieto_Abas)\
**Post date:** [March 8, 2019, 8:49pm UTC](https://forum.uipath.com/t/error-when-loading-python-code/100875/1 "2019-03-08T20:49:51Z")

</div>

Hi,  
I am trying to load a Python code, and after that execute a python Method with a String Argument, but it looks like I have a problem since the begining when trying to load my python code.  
Leave the error message here.

19.2.0+Branch.master.Sha.21b678a4c3a8b1362fcdd6e92496f991e5a7da37

Source: Image Transformation

Message: Error loading Python script

Exception Type: System.InvalidOperationException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:  
System.InvalidOperationException: Error loading Python script ----\> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: SyntaxError : (“(unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape”, (‘none’, 69, 22, None))

Server stack trace:  
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)  
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)  
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object ins, Object outs, TimeSpan timeout)  
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)  
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:  
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)  
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)  
at UiPath.Python.Service.IPythonService.LoadScript(String code)  
at UiPath.Python.Impl.OutOfProcessEngine.\<\>c\_\_DisplayClass11\_0.b\_\_0()  
at System.Threading.Tasks.Task`1.InnerInvoke()  
at System.Threading.Tasks.Task.Execute()  
— End of stack trace from previous location where exception was thrown —  
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)  
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)  
at UiPath.Python.Activities.LoadScript.d\_\_12.MoveNext()  
— End of inner ExceptionDetail stack trace —  
at UiPath.Python.Activities.LoadScript.d\_\_12.MoveNext()  
— End of stack trace from previous location where exception was thrown —  
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)  
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)  
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

---

<div class="post-metadata">

**Author:** ![loginerror](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/loginerror/32/22614_2.png) [@loginerror](https://forum.uipath.com/u/loginerror)\
**Post date:** [March 12, 2019, 2:08pm UTC](https://forum.uipath.com/t/error-when-loading-python-code/100875/2 "2019-03-12T14:08:23Z")

</div>

Hi @Jonathan_Prieto_Abas

Could you check your code at:

`System.ServiceModel.FaultException1[System.ServiceModel.ExceptionDetail]: SyntaxError : ("(unicode error) ‘unicodeescape’ codec can’t decode bytes in position 2-3: truncated \UXXXXXXXX escape", (‘none’, 69, 22, None))`

---

<div class="post-metadata">

**Author:** ![akhil.dwivedi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/akhil.dwivedi/32/176793_2.png) [@akhil.dwivedi](https://forum.uipath.com/u/akhil.dwivedi)\
**Post date:** [May 1, 2020, 11:07pm UTC](https://forum.uipath.com/t/error-when-loading-python-code/100875/3 "2020-05-01T23:07:10Z")

</div>

Hi Team,

Can anyone please guide is it possible to code in python instead of [Vb.net](http://Vb.net) in UI path.

---

<div class="post-metadata">

**Author:** ![msan](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/msan/32/110167_2.png) [@msan](https://forum.uipath.com/u/msan)\
**Post date:** [May 1, 2020, 11:27pm UTC](https://forum.uipath.com/t/error-when-loading-python-code/100875/4 "2020-05-01T23:27:09Z")

</div>

Really, you should have open another thread…

For python in UiPath, please read

> **[Activities](https://docs.uipath.com/activities/docs/python-activities)**
>
> This section includes App Scripting related activities found in the UiPath.Python.Activities pack. You can access them by following the links listed in the below See Also section.
