forta-network / forta-bot-sdk

Forta Detection Bot SDK and CLI tool
MIT License
71 stars 38 forks source link

Python on Windows does not like the path generated by process.cwd() #296

Open haseebrabbani opened 1 year ago

haseebrabbani commented 1 year ago

in get.python.agent.handlers.ts, we pass the contextPath of the bot project using NodeJS process.cwd(). on Windows, this returns a path like C:\\Users\\ASUS\\my-new-bot and when this is used in the Python script it does not compile i.e. sys.path.append("C:\\Users\\ASUS\\my-new-bot"). ideally we can use Python's path.cwd to get a suitable format