PyQGIS Problem adding certain vector layers to QGIS from postgres
The issue is probably the geometrytype. PostGIS can have generic geometry tables, fme can write them but QGIS can't handle them without you specifying the geometrytype.
Check the geometrytype of the spatial column. Make sure you have the "Create Generic Spatial Columns" box unchecked, then you can choose point / polyline / polygon etc.