YosefLab / Compass

In-Silico Modeling of Metabolic Heterogeneity using Single-Cell Transcriptomes
BSD 3-Clause "New" or "Revised" License
96 stars 28 forks source link

AttributeError: 'DataFrame' object has no attribute 'iteritems' #101

Open zhongguozhiwang opened 1 year ago

zhongguozhiwang commented 1 year ago

Hi! The following error occurs when I run the sample file, how should I solve it? $ compass --data test_data/tsv_format/expression.tsv --num-processes 10 --species homo_sapiens Cache for model and media already built Evaluating Reaction Penalties... Traceback (most recent call last): File "/public/home/chenyu/miniconda3/envs/compass/bin/compass", line 8, in <module> sys.exit(entry()) File "/public/home/chenyu/miniconda3/envs/compass/lib/python3.8/site-packages/compass/main.py", line 588, in entry penalties = eval_reaction_penalties(args['data'], args['model'], File "/public/home/chenyu/miniconda3/envs/compass/lib/python3.8/site-packages/compass/compass/penalties.py", line 96, in eval_reaction_penalties reaction_penalties = eval_reaction_penalties_shared( File "/public/home/chenyu/miniconda3/envs/compass/lib/python3.8/site-packages/compass/compass/penalties.py", line 158, in eval_reaction_penalties_shared for name, expression_data in expression.iteritems(): File "/public/home/chenyu/miniconda3/envs/compass/lib/python3.8/site-packages/pandas/core/generic.py", line 5989, in __getattr__ return object.__getattribute__(self, name) AttributeError: 'DataFrame' object has no attribute 'iteritems'

YzGLab commented 12 months ago

你可以用python3.7版本以下的。 3.8 3.9 会报错

zhongguozhiwang commented 11 months ago

你可以用python3.7版本以下的。 3.8 3.9 会报错

谢谢

naveena-ujagar commented 7 months ago

Hi I am having the same issue "AttributeError: 'DataFrame' object has no attribute 'iteritems'"

What did you do to fix it?

KunFang93 commented 6 months ago

Hi I am having the same issue "AttributeError: 'DataFrame' object has no attribute 'iteritems'"

What did you do to fix it?

Downgrade pandas to 1.5.3 works for me.

DrSujuanWang commented 3 months ago

Hi I am having the same issue "AttributeError: 'DataFrame' object has no attribute 'iteritems'" What did you do to fix it?

Downgrade pandas to 1.5.3 works for me.

Hi there, I just came across the problem, so which python version and numpy did you use to solve it? thanks.

giuliaelgarcia commented 2 months ago

Hi all, I am also getting the same issue: "AttributeError: 'DataFrame' object has no attribute 'iteritems'. By downgrading pandas compass won't work at all anymore. I also tried the Spark solution (https://stackoverflow.com/questions/76404811/attributeerror-dataframe-object-has-no-attribute-iteritems) and again Compass won't run. Does anyone know how to fix this?

xxz19900 commented 1 month ago

@giuliaelgarcia Have you ever solved this bug?