Page 1 of 1

error when using plot_excitons.py

Posted: Fri Dec 17, 2021 11:43 am
by pangrt
Dear developers,
I tried to get the file absorptionspectra.json. I run the bse part of the tutorial and then using "python plot_excitons.py bse yambo", an error message is reported
Preparing JSON file. Calling ypp ...
Traceback (most recent call last):
File "/home/pangrongtian_31946009_wsd_155/pangrt/tutorial/bn/plot_excitons.py", line 58, in <module>
a = YamboBSEAbsorptionSpectra(jobname,path=path)
TypeError: __init__() got an unexpected keyword argument 'path'

How can i solve this error?
Thanks!
Pangrt

Re: error when using plot_excitons.py

Posted: Fri Dec 17, 2021 12:37 pm
by palful
Dear Pangrt,

The supported yambopy version can be downloaded here: are you using this version?

The BSE tutorial corresponding to this version is found on this yambo wiki page: are you following this tutorial?

From your message, it looks like you might be using a very old version of yambopy.

Cheers,
Fulvio

Re: error when using plot_excitons.py

Posted: Sun Dec 19, 2021 2:24 am
by pangrt
Dear Fulvio,
Thank you very much for your reply. I am using the new version, but I found that this new BSE tutorial does not have a JSON file part, how can I get this file through the new version.
Thanks!
Pangrt

Re: error when using plot_excitons.py

Posted: Wed Dec 22, 2021 4:58 pm
by palful
Dear Pangrt,

If you need to keep using json files, you may use the the function pack_files_in_folder('folder').

Check for example the "plot-bse-conv.py" script in the bn tutorial folder, which gives you an idea of how it works.

Cheers,
Fulvio