error when using plot_excitons.py

Post here any question you encounter when running the scripts of the yambo-py suite. Post here problem strictly to the python interface as problem coming from the yambo runs should go in the appropriate subforum.

Moderators: palful, amolina, mbonacci

Post Reply
pangrt
Posts: 26
Joined: Thu Jun 18, 2020 1:38 pm

error when using plot_excitons.py

Post by pangrt » Fri Dec 17, 2021 11:43 am

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
RongTianPang, Inner Mongolia University, Hohhot, China :)

User avatar
palful
Posts: 56
Joined: Tue Jan 26, 2016 11:23 am
Location: Modena and Milan

Re: error when using plot_excitons.py

Post by palful » Fri Dec 17, 2021 12:37 pm

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
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy

pangrt
Posts: 26
Joined: Thu Jun 18, 2020 1:38 pm

Re: error when using plot_excitons.py

Post by pangrt » Sun Dec 19, 2021 2:24 am

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
RongTianPang, Inner Mongolia University, Hohhot, China :)

User avatar
palful
Posts: 56
Joined: Tue Jan 26, 2016 11:23 am
Location: Modena and Milan

Re: error when using plot_excitons.py

Post by palful » Wed Dec 22, 2021 4:58 pm

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
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy

Post Reply