Somehow, my attempt at setting the QGIS project coordinate reference system to a Sinusoidal projection by defining the CRS' EPSG ID returns Invalid CRS!
.
crs = 54008 # World Sinusoidal Projection
# Set project coordinate reference system (CRS)
spatRef = QgsCoordinateReferenceSystem(crs, QgsCoordinateReferenceSystem.EpsgCrsId)
if spatRef.isValid():
print("CRS Description: {}".format(spatRef.description()))
print("CRS PROJ text: {}".format(spatRef.toProj4()))
QgsProject.instance().setCrs(spatRef)
else:
print("Invalid CRS!")
I use the long-term QGIS version 3.10.3 on Windows.