Error with use WSC on fig.add_subplot(111,projection=Pj)

My code was working fine until a few days ago when I updated Astropy.

My code works correctly until this part:
pvdiagram =‘my_PVslice11.fits’)

Pj = WCS(pvdiagram[0].header)


but, I when use


the code mark error

Could you post the full error you are getting? Could you also provide the output of ‘print(Pj)’? Thanks!