After using Pycharm's intellisense it worked. I then upadted VS code intellisense and it also worked.