Page 1 of 1

Yambopy errors in plotem1s process

Posted: Tue Jun 22, 2021 2:36 pm
by jasonhan0710
Dear all,

I want to get the dielectric function in GW calculation. In GW calculation, I used the the COHSEX to get the em1s files. Then, I copy all the em1s files into SAVE folder. and I want to use

Code: Select all

yambopy plotem1s ./SAVE
command to plot the dielectric function. However, it reported that

Code: Select all

Traceback (most recent call last):
  File "/data/home/djy3/.local/bin/yambopy", line 4, in <module>
    __import__('pkg_resources').run_script('yambopy==0.1', 'yambopy')
  File "/data/home/djy3/software/anaconda3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 650, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/data/home/djy3/software/anaconda3/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1446, in run_script
    exec(code, namespace, namespace)
  File "/data/home/djy3/.local/lib/python3.8/site-packages/yambopy-0.1-py3.8.egg/EGG-INFO/scripts/yambopy", line 390, in <module>
    ycmd = YambopyCmd(*sys.argv)
  File "/data/home/djy3/.local/lib/python3.8/site-packages/yambopy-0.1-py3.8.egg/EGG-INFO/scripts/yambopy", line 383, in __init__
    self.cmd = cmdclass(args[2:])
  File "/data/home/djy3/.local/lib/python3.8/site-packages/yambopy-0.1-py3.8.egg/EGG-INFO/scripts/yambopy", line 98, in __init__
    ys = YamboStaticScreeningDB(save=folder)
  File "/data/home/djy3/.local/lib/python3.8/site-packages/yambopy-0.1-py3.8.egg/yambopy/dbs/em1sdb.py", line 63, in __init__
    self.cutoff = ("".join(database.variables['CUTOFF'][:][0]).strip())
TypeError: sequence item 0: expected str instance, numpy.bytes_ found
Is there anyone can help me fix this problem? Thank you!

Best regards,
Jason

Re: Yambopy errors in plotem1s process

Posted: Tue Jun 22, 2021 6:04 pm
by palful
Dear Jason,

Are you sure that you have the latest version of yambopy?

This bug was corrected some time ago and the line in question: self.cutoff = ("".join(database.variables['CUTOFF'][:][0]).strip()), has been replaced.
Try to do "git pull" in order to download the updated version, and then reinstall yambopy with the setup.py script.

Let us know if it worked!

Cheers,
Fulvio

Re: Yambopy errors in plotem1s process

Posted: Wed Jun 23, 2021 1:47 am
by jasonhan0710
Dear Fulvio,

It works. Thank you!

Best,
Jason