# Errors in ScreneSpace Scene with PulseCSVReader

**URL:** https://discourse.kitware.com/t/errors-in-screnespace-scene-with-pulsecsvreader/954
**Category:** Pulse Physiology Engine
**Created:** [December 23, 2022, 12:59am UTC](https://discourse.kitware.com/t/errors-in-screnespace-scene-with-pulsecsvreader/954 "2022-12-23T00:59:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![crystal-butler](https://discourse.kitware.com/user_avatar/discourse.kitware.com/crystal-butler/32/632_2.png) [@crystal-butler](https://discourse.kitware.com/u/crystal-butler)
#### Post date: [December 23, 2022, 12:59am UTC](https://discourse.kitware.com/t/errors-in-screnespace-scene-with-pulsecsvreader/954/1 "2022-12-23T00:59:44Z")

</div>

I’m using Pulse Physiology Engine in a Unity 2020.3.40f1 project and am getting errors trying to use PulseCSVReader with the VitalsMonitorExampleData.csv file provided in the asset.

I have set the data source for CameraCanvas-\>Line-\>Number-\>PulseDataNumberRenderer to PulseCSVReader and the CSV input in the PulseCSVReader component to VitalsMonitorExampleData using the Unity Inspector. An error is generated in the Inspector in the PulseDataNumberRenderer component that says “Error: Data source could not generate valid data fields”. I also get an error in the console:

> NullReferenceException: Object reference not set to an instance of an object  
> PulseCSVReader.ComputeHeaders () (at Assets/PulsePhysiologyEngine/Scripts/PulseCSVReader.cs:158)  
> PulseCSVReader.OnValidate () (at Assets/PulsePhysiologyEngine/Scripts/PulseCSVReader.cs:42)

It seems like `data.fields` in PulseCSVReader and `source.data.fields` in PulseDataConsumerEditor are the problems, even though the CSV `lines` array that should be generating the headers for `data.fields` is populated and appears to be correct.

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [December 23, 2022, 4:48am UTC](https://discourse.kitware.com/t/errors-in-screnespace-scene-with-pulsecsvreader/954/2 "2022-12-23T04:48:16Z")

</div>

Hmmm  
I have not run that example in a while  
It’s possible I may have updated an interface and not updated that chain of classes

I will need to test that and see what I can

---

<div class="post-metadata">

### Author: ![abray](https://discourse.kitware.com/user_avatar/discourse.kitware.com/abray/32/12_2.png) [@abray](https://discourse.kitware.com/u/abray)
#### Post date: [December 23, 2022, 3:18pm UTC](https://discourse.kitware.com/t/errors-in-screnespace-scene-with-pulsecsvreader/954/3 "2022-12-23T15:18:59Z")

</div>

I just needed to allocate the data.fields to get this scene running again

[https://gitlab.kitware.com/physiology/unity/-/commit/17ec824e0172869692955f2686d163d5ccffe9d0](https://gitlab.kitware.com/physiology/unity/-/commit/17ec824e0172869692955f2686d163d5ccffe9d0)

---

<div class="post-metadata">

### Author: ![crystal-butler](https://discourse.kitware.com/user_avatar/discourse.kitware.com/crystal-butler/32/632_2.png) [@crystal-butler](https://discourse.kitware.com/u/crystal-butler)
#### Post date: [December 23, 2022, 7:19pm UTC](https://discourse.kitware.com/t/errors-in-screnespace-scene-with-pulsecsvreader/954/4 "2022-12-23T19:19:11Z")

</div>

Thanks for the quick response! Confirmed that PulseCSVReader and the ScreenSpace example are working with the change.
