I have the same issue on pi 2,3,4. try using the camera twice, the second time goes through. Its not pretty but it works. (apologies if the spacing is incorrect)
$this->bbcode_second_pass_code('', '
import picamera
for _ in range(2):
try: # try to init camera _ times
cam = picamera.PiCamera()
cam.start_preview()
except picamera.exc.PiCameraMMALError:
print("warning: unable to start camera")
cam.whatever.you.want.to.do()
')