Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix two calls to Exception.message, which no longer exists #1752

Merged
merged 1 commit into from Oct 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion rmgpy/chemkin.pyx
Expand Up @@ -1364,7 +1364,7 @@ def read_reactions_block(f, species_dict, read_comments=True):
reaction = read_kinetics_entry(kinetics, species_dict, Aunits, Eunits)
reaction = read_reaction_comments(reaction, comments, read=read_comments)
except ChemkinError as e:
if e.message == "Skip reaction!":
if "Skip reaction!" in str(e):
logging.warning("Skipping the reaction {0!r}".format(kinetics))
continue
else:
Expand Down
4 changes: 2 additions & 2 deletions rmgpy/solver/base.pyx
Expand Up @@ -732,8 +732,8 @@ cdef class ReactionSystem(DASx):
if np.isnan(self.y).any():
raise DASxError("nans in moles")
except DASxError as e:
logging.error("Trying to step from time {} to {} resulted in a solver (DASPK) error: "
"{}".format(prev_time, step_time, e.message))
logging.error("Trying to step from time {0} to {1} resulted in a solver (DASPK) error: "
"{2!s}".format(prev_time, step_time, e))

logging.info('Resurrecting Model...')

Expand Down