# Runtime error: sensor timeout!

**URL:** <https://forums.openmv.io/t/runtime-error-sensor-timeout/542>\
**Category:** OpenMV Boards\
**Created:** [January 5, 2018, 7:52pm UTC](https://forums.openmv.io/t/runtime-error-sensor-timeout/542 "2018-01-05T19:52:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![serg706](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@serg706](https://forums.openmv.io/u/serg706)\
**Post date:** [January 5, 2018, 7:52pm UTC](https://forums.openmv.io/t/runtime-error-sensor-timeout/542/1 "2018-01-05T19:52:51Z")

</div>

Error occurs after several seconds of operation. Code is very simple.

import sensor  
img = sensor.snapshot()  
while(True):  
img = sensor.snapshot()

Factory reset did not help.  
M7 version, firmware 2.60 latest.

---

<div class="post-metadata">

**Author:** ![iabdalkader](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/iabdalkader/32/1169_2.png) [@iabdalkader](https://forums.openmv.io/u/iabdalkader)\
**Post date:** [January 5, 2018, 10:41pm UTC](https://forums.openmv.io/t/runtime-error-sensor-timeout/542/2 "2018-01-05T22:41:56Z")

</div>

Hi, you need to call sensor.reset() and set the frame size and format before doing anything else. See the **helloworld.py example**.
