you can remove the lens from the camera, set the lens to the smallest aperture, and use the lock button to hold it there. Re-connect the lens, turn the camera back on, and all should be well. If you are still facing an error then you can also try another memory card to save your photos. It may be your current memory card got corrupt.