How to read sql file from a Repo to string

pabloaus
New Contributor III

I am trying to read a sql file in the repo to string. I have tried

with open("/Workspace/Repos/xx@***.com//file.sql","r") as queryFile:
   queryText = queryFile.read()

And I get following error.

[Errno 1] Operation not permitted: '/Workspace/Repos/***@***.com//file.sql'