# TypeError: Cannot read properties of null (reading 'width') - video stimuli

**URL:** <https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016>\
**Category:** Online experiments\
**Tags:** online, pavlovia\
**Created:** [November 21, 2024, 3:54pm UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016 "2024-11-21T15:54:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nsf99](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@nsf99](https://discourse.psychopy.org/u/nsf99)\
**Post date:** [November 21, 2024, 3:54pm UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016/1 "2024-11-21T15:54:59Z")

</div>

URL of experiment: [DOT\_MOV [PsychoPy]](https://run.pavlovia.org/multisensorytcd/dot_mov)

Description of the problem:  
I am running a study which includes videos, I have successfully ran an identical study but using images instead. However, I seem to run into an error when using video stimuli.  
When I try to run my experiment online, it runs normally for a few trials but then eventually I encounter an error that says ‘TypeError: Cannot read properties of null (reading ‘width’)’. I would really appreciate some advice on how to solve this issue.  
Thank you!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 21, 2024, 4:08pm UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016/2 "2024-11-21T16:08:56Z")

</div>

> [@nsf99](#):
>
> ‘TypeError: Cannot read properties of null (reading ‘width’)’.

That sounds like you might have a blank row in your spreadsheet.

---

<div class="post-metadata">

**Author:** ![nsf99](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@nsf99](https://discourse.psychopy.org/u/nsf99)\
**Post date:** [November 21, 2024, 4:29pm UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016/3 "2024-11-21T16:29:13Z")

</div>

I just finished deleting all blank rows and columns and still continue to get the same error.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 21, 2024, 5:04pm UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016/4 "2024-11-21T17:04:47Z")

</div>

Try an incognito tab

---

<div class="post-metadata">

**Author:** ![nsf99](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@nsf99](https://discourse.psychopy.org/u/nsf99)\
**Post date:** [November 22, 2024, 10:22am UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016/5 "2024-11-22T10:22:41Z")

</div>

Hi there, I have also just tried that and again encountered the same error.

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [November 22, 2024, 10:41am UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016/6 "2024-11-22T10:41:21Z")

</div>

If you have a loop set to random and an error appearing at a random point, try setting the loop to sequential to identify which trial is causing the issue. My assumption was that it was a blank row, but it could, for example, be a problem with one of the video files themselves.

---

<div class="post-metadata">

**Author:** ![nsf99](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@nsf99](https://discourse.psychopy.org/u/nsf99)\
**Post date:** [November 22, 2024, 10:49am UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016/7 "2024-11-22T10:49:23Z")

</div>

Okay thank you, I will try that

---

<div class="post-metadata">

**Author:** ![nsf99](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@nsf99](https://discourse.psychopy.org/u/nsf99)\
**Post date:** [November 22, 2024, 1:44pm UTC](https://discourse.psychopy.org/t/typeerror-cannot-read-properties-of-null-reading-width-video-stimuli/43016/8 "2024-11-22T13:44:12Z")

</div>

I have just tried running each set of video files individually and sequentially and they work perfectly with no issues. The error seems to arise when I set the experiment to combine the files and randomise the order they are shown to participants.
