Python Scope: Pipe is broken when importing gspread

I have been researching on this for a while but I couldn’t find a solution.

I am using UiPath Studio and trying to run python script using the “Run Python Script” activity. However, there is a pipe is broken error.

I know this error is generic so I tried to zoom into the error through Try Catch. I am importing only 4 modules into the script:

import time
from oauth2client.service_account import ServiceAccountCredentials
import csv
import gspread

“import gspread” seems to be causing the error since when I shift the rest outside of the try catch block, there is no issues. I have checked that gspread is installed and I ran it on IDLE to make sure it’s working.

I am using Python 3.9

Please help me :frowning:

@Donavan-Er

Welcome to the community

Can you check the even viewer log when the error occurs …you might get some info there as well about what failed

Also run in debug …open exception details from locals panel and see if you might get any other info

And are you using any specific ide? Like jupiter or so? If so check if the package is installed in an environment or locally

Cheers

Hi Anil,

I tried using VENV as well as the locally-installed Python 3.9. I tried to run the script via Python 3.9 IDLE and it works but when I run it via UiPath, there’s pipe is broken error when the script hits “import gspread” (I used Try Catch to find this out whereby I will move the try line downwards 1 line by 1 line)