# Error in scvi.model.SCANVI.load\_query\_data

**URL:** <https://discourse.scverse.org/t/error-in-scvi-model-scanvi-load-query-data/518>\
**Category:** scvi-tools\
**Tags:** scanvi\
**Created:** [June 3, 2022, 8:34pm UTC](https://discourse.scverse.org/t/error-in-scvi-model-scanvi-load-query-data/518 "2022-06-03T20:34:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TemiLeke](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/temileke/32/272_2.png) [@TemiLeke](https://discourse.scverse.org/u/TemiLeke)\
**Post date:** [June 3, 2022, 8:34pm UTC](https://discourse.scverse.org/t/error-in-scvi-model-scanvi-load-query-data/518/1 "2022-06-03T20:34:42Z")

</div>

Hello, Thanks a lot for this helpful tool.

For the first time since using the scanvi tool for reference mapping, I got the following error

````auto
ValueError: Category nan not found in source registry. Cannot transfer setup without `extend_categories = True`.```

How do I resolve this?
````

---

<div class="post-metadata">

**Author:** ![adamgayoso](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/adamgayoso/32/100_2.png) [@adamgayoso](https://discourse.scverse.org/u/adamgayoso)\
**Post date:** [June 3, 2022, 8:36pm UTC](https://discourse.scverse.org/t/error-in-scvi-model-scanvi-load-query-data/518/2 "2022-06-03T20:36:30Z")

</div>

Do you have any nan values in the labels you’re using? Can you paste all your relevant code?

---

<div class="post-metadata">

**Author:** ![TemiLeke](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/temileke/32/272_2.png) [@TemiLeke](https://discourse.scverse.org/u/TemiLeke)\
**Post date:** [June 3, 2022, 9:03pm UTC](https://discourse.scverse.org/t/error-in-scvi-model-scanvi-load-query-data/518/3 "2022-06-03T21:03:52Z")

</div>

Thanks for your prompt reply. I fixed it after figuring that I already created a `"labels_scanvi"` column in the query before running `load_query_data.` Thanks!
