From 75b01b307d9aa91a3b7eeedbf5b7fbdce0809425 Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Wed, 30 Nov 2022 12:31:55 +0100 Subject: [PATCH] CalcJobFollower call in node viewer compatible API (#327) --- aiidalab_qe/widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiidalab_qe/widgets.py b/aiidalab_qe/widgets.py index 58998ccb1..871b17235 100644 --- a/aiidalab_qe/widgets.py +++ b/aiidalab_qe/widgets.py @@ -296,7 +296,7 @@ def _fetch_output(self, calcjob): if "retrieved" in calcjob.outputs: try: self.filename = calcjob.base.attributes.get("output_filename") - with calcjob.outputs.retrieved.open(self.filename) as f: + with calcjob.outputs.retrieved.base.repository.open(self.filename) as f: return f.read().splitlines() except OSError: return list() @@ -354,8 +354,8 @@ def __init__(self, calcjob, **kwargs): self.output_follower = CalcJobOutputFollower() self.log_output = LogOutputWidget() + self.output_follower.calcjob_uuid = self.calcjob.uuid self.output_follower.observe(self._observe_output_follower_lineno, ["lineno"]) - self.output_follower.calcjob = self.calcjob super().__init__( [ipw.HTML(f"CalcJob: {self.calcjob}"), self.log_output], **kwargs