Error in scvi.model.SCANVI.load_query_data

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

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

How do I resolve this?

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

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!