From 181ef1e803d418ab77e4381391af951f753cb918 Mon Sep 17 00:00:00 2001 From: Oscar Wu Date: Tue, 26 May 2020 01:42:07 -0400 Subject: [PATCH] BugFix: use str(freq_level) to get frequency scale factor from dict The keys of data.freq_dict are strings, but freq_level is an object. This mismatch results in KeyError. --- arkane/encorr/corr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arkane/encorr/corr.py b/arkane/encorr/corr.py index 49795c5da58..99dbae735ef 100644 --- a/arkane/encorr/corr.py +++ b/arkane/encorr/corr.py @@ -236,10 +236,10 @@ def assign_frequency_scale_factor(level_of_theory: Union[LevelOfTheory, Composit return 1 freq_level = getattr(level_of_theory, 'freq', level_of_theory) try: - scaling_factor = data.freq_dict[freq_level] + scaling_factor = data.freq_dict[str(freq_level)] except KeyError: try: - scaling_factor = data.freq_dict[freq_level.simple()] + scaling_factor = data.freq_dict[str(freq_level.simple())] except KeyError: scaling_factor = 1 else: