Tutorial: AttributeError: 'NoneType' object has no attribute 'rownames'AttributeError: 'NoneType' object has no attribute 'rownames'


It’s my first time trying lefse through CLI, but i get the following error when I run the tutorial pipeline, in the lefse_run step, here’s the detailed error:

(test) MacBook-Pro-de-Taha:Desktop tahazakariya$ lefse_run.py hmp_aerobiosis_small.in hmp_aerobiosis_small.res
Number of significantly discriminative features: 51 ( 131 ) before internal wilcoxon
Traceback (most recent call last):
  File "/Users/tahazakariya/opt/anaconda3/envs/test/bin/lefse_run.py", line 8, in <module>
  File "/Users/tahazakariya/opt/anaconda3/envs/test/lib/python3.9/site-packages/lefse/lefse_run.py", line 90, in lefse_run
    if params['rank_tec'] == 'lda': lda_res,lda_res_th = test_lda_r(cls,feats,class_sl,params['n_boots'],params['f_boots'],params['lda_abs_th'],0.0000000001,params['nlogs'])
  File "/Users/tahazakariya/opt/anaconda3/envs/test/lib/python3.9/site-packages/lefse/lefse.py", line 222, in test_lda_r
    rowns = list(rres.rownames)
AttributeError: 'NoneType' object has no attribute 'rownames'

Note that I used a new environment with only python and R required packages.
Can someone provide some help please ? Thanks

Hi Taha,
I had the same issue, which I suppose is related to updates of the dependencies. However, I managed to overcome this by installing the previous versions of rpy2 (3.5.10) and numpy (1.24.3).
Hope this helps!

1 Like