For anyone in future. I tried all different solutions and it didn't work. It appears that VS code was the issue for me.Running the code directly from shell works. Found the solution hidden in this post.