Hello,
I'd like to read and plot the em1s data using yambopy and got the following error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/wxiaom86/.local/lib/python3.7/site-packages/yambopy-0.1-py3.7.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
Seems type mismatch?
Best,
Xiaoming
YamboStaticScreeningDB error
Moderators: palful, amolina, mbonacci
-
- Posts: 67
- Joined: Fri Dec 18, 2020 7:14 am
YamboStaticScreeningDB error
Xiaoming Wang
The University of Toledo
The University of Toledo
-
- Posts: 67
- Joined: Fri Dec 18, 2020 7:14 am
Re: YamboStaticScreeningDB error
I worked out by changing line 63 to .
Code: Select all
self.cutoff = str(database.variables['CUTOFF'][:][0],'UTF-8').strip()
Xiaoming Wang
The University of Toledo
The University of Toledo
- palful
- Posts: 60
- Joined: Tue Jan 26, 2016 11:23 am
- Location: Modena and Milan
Re: YamboStaticScreeningDB error
Dear Xiaoming,
Thank you very much for the bug fix! I have implemented it and pushed in the yambopy repository.
The self.cutoff line was a leftover from the python 2.7 version where the type conversion wasn't needed: this was the cause.
Cheers,
Fulvio
Thank you very much for the bug fix! I have implemented it and pushed in the yambopy repository.
The self.cutoff line was a leftover from the python 2.7 version where the type conversion wasn't needed: this was the cause.
Cheers,
Fulvio
Dr. Fulvio Paleari
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy
S3-CNR Institute of Nanoscience and MaX Center
Modena, Italy
-
- Posts: 67
- Joined: Fri Dec 18, 2020 7:14 am
Re: YamboStaticScreeningDB error
Dear Fulvio,
Thanks. It's good to know that.
Another problem that I have is the gvector read by yambopy. In line 53 of em1sdb.py, the np.rint function would round the gvector of 0.5 to 0, which changes from the X_RL_vecs in the ndb.em1s dataset.
Best,
Xiaoming
Thanks. It's good to know that.
Another problem that I have is the gvector read by yambopy. In line 53 of em1sdb.py, the np.rint function would round the gvector of 0.5 to 0, which changes from the X_RL_vecs in the ndb.em1s dataset.
Best,
Xiaoming
Xiaoming Wang
The University of Toledo
The University of Toledo