[Wien] Berrypi Error

Rubel, Oleg rubelo at mcmaster.ca
Fri Nov 17 18:23:38 CET 2023


Dear Sharbano,

Many thanks for sharing the fix. I will take a closer look in the next couple of days.

Best regards
Oleg

> -----Original Message-----
> From: Wien <wien-bounces at zeus.theochem.tuwien.ac.at> On Behalf Of
> shahrbano rahimi
> Sent: Friday, November 17, 2023 11:17 AM
> To: A Mailing list for WIEN2k users <wien at zeus.theochem.tuwien.ac.at>
> Subject: [Wien] Berrypi Error
> 
> 	Caution: External email.
> 
> 
> Dear Prof. Peter Blaha and Prof. Oleg Rubel,
> 
> 
> hope this email finds you in good health and spirits. I am reaching out to
> respectfully report a technical challenge we recently encountered in our
> Wien2k calculations using BerrypI, and to share the solution we found in
> hopes that it might be helpful.
> 
> Our team has been utilizing Wien2k version 23.2, along with Python version
> 3.10.9 and Numpy version 1.23.5. Initially, the electronic part of the
> calculations proceeded without any issues. However, we stumbled upon a
> snag in the ionic part, which resulted in the following error message:
> 
> “Traceback (most recent call last): File "/opt/codes/wien2k/v23.2/berrypi",
> line 1081, in <module> theCalc =
> postProcBerryPhase(configFile,phasesRaw,spCalc) File
> "/opt/codes/wien2k/v23.2/berrypi", line 72, in postProcBerryPhase
> mainCalculation = b_PyCalc.MainCalculationContainer( File
> "/opt/codes/wien2k/v23.2/SRC_BerryPI/BerryPI/calculations.py", line 338, in
> init ionP = self.determineIonPolarization(wrpFn,args) File
> "/opt/codes/wien2k/v23.2/SRC_BerryPI/BerryPI/calculations.py", line 621, in
> determineIonPolarization if isinstance(iValence, collections.Iterable):
> AttributeError: module 'collections' has no attribute 'Iterable'”
> 
> In our efforts to resolve this, we made the following changes in the
> calculations.py file:
> 
> 1.	Altered the import statement from:
> 
> 	import collections
> 
> 	to:
> 
> 	from collections.abc import Iterable
> 
> 2.	Amended the following line:
> 
> 	from:
> 
> 	if isinstance(iValence, collections.Iterable):
> 
> 	to:
> 
> 	if isinstance(iValence, Iterable):
> 
> These modifications have thankfully resolved the 'collections.Iterable' error,
> allowing our calculations to proceed without further issues.
> 
> I thought it prudent to share this experience with you, given your profound
> expertise and significant contributions to the development of Wien2k. Your
> guidance and insights have always been invaluable to our work, and I hope
> this information might be of some utility in your ongoing endeavors.
> 
> Thank you very much for your time and attention to this matter. Any further
> insights or suggestions from your esteemed perspectives would be greatly
> appreciated.
> 
> With sincere respect and best regards,
> 
> Sharbano Rahimi



More information about the Wien mailing list