# Error Loading Python Script in a particular script but other scripts are working

**URL:** <https://forum.uipath.com/t/error-loading-python-script-in-a-particular-script-but-other-scripts-are-working/119066>\
**Category:** Academy Feedback\
**Tags:** python, activities\
**Created:** [May 23, 2019, 11:06am UTC](https://forum.uipath.com/t/error-loading-python-script-in-a-particular-script-but-other-scripts-are-working/119066 "2019-05-23T11:06:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![spattanayak51](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/spattanayak51/32/264837_2.png) [@spattanayak51](https://forum.uipath.com/u/spattanayak51)\
**Post date:** [May 23, 2019, 11:06am UTC](https://forum.uipath.com/t/error-loading-python-script-in-a-particular-script-but-other-scripts-are-working/119066/1 "2019-05-23T11:06:05Z")

</div>

![error%20loading%20python%20script](https://global.discourse-cdn.com/uipath/original/3X/6/2/62470a63c6b69b7a68636605ea6a03b275f15818.png)

The following is the details  
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:  
System.InvalidOperationException: Error loading Python script ----\> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: AttributeError : module ‘sys’ has no attribute ‘argv’

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:** ![Rahul\_Pasupuleti](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rahul_pasupuleti/32/62938_2.png) [@Rahul\_Pasupuleti](https://forum.uipath.com/u/Rahul_Pasupuleti)\
**Post date:** [May 28, 2019, 2:09pm UTC](https://forum.uipath.com/t/error-loading-python-script-in-a-particular-script-but-other-scripts-are-working/119066/3 "2019-05-28T14:09:42Z")

</div>

Hi,  
Can you share your python script to look into the issue better?  
Thanks

---

<div class="post-metadata">

**Author:** ![harishreddy](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@harishreddy](https://forum.uipath.com/u/harishreddy)\
**Post date:** [December 11, 2019, 12:22pm UTC](https://forum.uipath.com/t/error-loading-python-script-in-a-particular-script-but-other-scripts-are-working/119066/4 "2019-12-11T12:22:50Z")

</div>

Hi,

facing the same issue. my code is working fine in python app, but getting error while calling it into Uipath. Please help.

---

<div class="post-metadata">

**Author:** ![spattanayak51](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/spattanayak51/32/264837_2.png) [@spattanayak51](https://forum.uipath.com/u/spattanayak51)\
**Post date:** [December 11, 2019, 12:37pm UTC](https://forum.uipath.com/t/error-loading-python-script-in-a-particular-script-but-other-scripts-are-working/119066/5 "2019-12-11T12:37:27Z")

</div>

Just create a .bat file and in uipath studio use start process activity to call that .bat file. That resolved my issue.

---

<div class="post-metadata">

**Author:** ![harishreddy](https://avatars.discourse-cdn.com/v4/letter/h/c4cdca/32.png) [@harishreddy](https://forum.uipath.com/u/harishreddy)\
**Post date:** [December 11, 2019, 1:15pm UTC](https://forum.uipath.com/t/error-loading-python-script-in-a-particular-script-but-other-scripts-are-working/119066/6 "2019-12-11T13:15:29Z")

</div>

In my code I will get Output arguments, so how to get those output values by running .bat file?
