Rendering frames:Black and white instead of colour images, settings are RGBA I am trying to render few specific frames through python, both depth and colour images. Script is given below. Output images of depth are correct but rgb images are black and white. What could be the reason, how can I fix it?

 . 

render_layers = nodes.new('CompositorNodeRLayers')
output_file_rgb = nodes.new("CompositorNodeOutputFile")
output_file_depth= nodes.new("CompositorNodeOutputFile")
normalizer=nodes.new("CompositorNodeNormalize")
viewer = nodes.new('CompositorNodeViewer')   

scene.node_tree.links.new(  
    render_layers.outputs['Image'],
    output_file_rgb.inputs['Image']
    )
scene.node_tree.links.new(
    render_layers.outputs['Z'],
    normalizer.inputs['Value']
    )
scene.node_tree.links.new(
    normalizer.outputs['Value'],
    output_file_depth.inputs['Image']
    )
scene.node_tree.links.new(  
    normalizer.outputs['Value'],
    viewer.inputs['Image']
    )

.
.
.

for f in frame_numbers:
     scene.frame_set( f )
     scene.update()
     output_file_depth.base_path = "D:/dep/"
     output_file_depth.file_slots[0].path="Imagede"
     output_file_rgb.base_path = "D:/rgb/"
     output_file_rgb.file_slots[0].path="Imagergb"     
     bpy.ops.render.render(write_still=True)
It was because the textures are not imported. If you are importing models, make sure that textures are also imported before rendering