Problems subsetting

Hi, I’m new to scanpy. I’ve had a pretty good go of it, running in RStudio, but I’ve run into an issue trying to subset a cluster in my dataset. I’m doing Inner ear scRNA seq, and want to look at differences in my IHC cluster. However, when I input the code:

adata_subset = adata[adata.obs[“leiden”] == “IHC”]

I get the error message:

AttributeError: ‘AnnData’ object has no attribute ‘_X’

Looking at my anndata object, it returns:
AnnData object with n_obs × n_vars = 1600 × 20182
obs: ‘orig.ident’, ‘nCount_RNA’, ‘nFeature_RNA’, ‘’, ‘’, ‘percent_Hblist’, ‘RNA_snn_res.1.2’, ‘seurat_clusters’, ‘RNA_snn_res.0.8’, ‘RNA_snn_res.0.4’, ‘n_genes_by_counts’, ‘total_counts’, ‘total_counts_mt’, ‘pct_counts_mt’, ‘leiden’, ‘dpt_pseudotime’, ‘distance’, ‘louvain’
var: ‘vst.mean’, ‘vst.variance’, ‘vst.variance.expected’, ‘vst.variance.standardized’, ‘vst.variable’, ‘highly_variable’, ‘means’, ‘dispersions’, ‘dispersions_norm’, ‘mt’, ‘n_cells_by_counts’, ‘mean_counts’, ‘pct_dropout_by_counts’, ‘total_counts’
uns: ‘dendrogram_leiden’, ‘diffmap_evals’, ‘hvg’, ‘iroot’, ‘leiden’, ‘leiden_colors’, ‘leiden_sizes’, ‘neighbors’, ‘paga’, ‘pca’, ‘umap’, ‘rank_genes_groups’, ‘louvain’, ‘louvain_colors’
obsm: ‘X_diffmap’, ‘X_pca’, ‘X_tsne’, ‘X_umap’
varm: ‘PCs’
obsp: ‘connectivities’, ‘distances’

So ‘leiden’ IS in .obs, but for some reason it won’t give me the subset I need. Any help would be appreciated.

Additionally, how would I go about separating the IHCs based on TdTomato expression to compare transcriptomes?