PyPythia icon indicating copy to clipboard operation
PyPythia copied to clipboard

AttributeError on plot

Open cassiabitencourt opened this issue 1 year ago • 2 comments

Hi Julia:

I am running the latest version, and I found this error:

Traceback (most recent call last):
  File "/mnt/shared/scratch/cbitenco/apps/conda/bin/pythia", line 8, in <module>
    sys.exit(main())
  File "/mnt/shared/scratch/cbitenco/apps/conda/lib/python3.9/site-packages/pypythia/prediction.py", line 314, in main
    fig.tight_layout()
AttributeError: 'AxesSubplot' object has no attribute 'tight_layout'

Can you check or fix it, please? Or I am missing something.

Many thanks, Cassia.

cassiabitencourt avatar Mar 06 '24 15:03 cassiabitencourt

Hi Cassia! I'm sorry that you are having trouble using Pythia. I suspect that this is an issue with software versions. Can you maybe send me a list of your package versions? It appears that you are using conda, so you can simply type conda env export > environment.yml and attach the generated environment.yml file 🙂

tschuelia avatar Mar 11 '24 05:03 tschuelia

Hi,

I have a similar error that refers to the same line if I turn on the Shapley value computation (--shap):

  File "/mnt/shared/scratch/tvarga/apps/conda/envs/phytia/bin/pythia", line 10, in <module>
    sys.exit(main())
  File "/mnt/shared/scratch/tvarga/apps/conda/envs/phytia/lib/python3.11/site-packages/pypythia/prediction.py", line 314, in main
    fig.tight_layout()
AttributeError: 'Axes' object has no attribute 'tight_layout'. Did you mean: '_in_layout'?

Please find the list of packages here: environment.txt

Thank you!

vtorda avatar Jul 27 '24 18:07 vtorda

Hi! Sorry for the very late response, I spent my summer doing an internship and was not able to work on this. I just pushed a fix and will release the new version 1.2.0 today!

tschuelia avatar Oct 15 '24 09:10 tschuelia