Skip to content

Commit

Permalink
hotfix for untested last minute modif. that broke LocalHost
Browse files Browse the repository at this point in the history
  • Loading branch information
francoislaurent committed Jan 11, 2021
1 parent 0aa4840 commit 2606a4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tramway/analyzer/env/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ def import_ipynb(self, notebook):
"""
cmd = 'jupyter nbconvert --to python "{}" --stdout'.format(notebook)
self.logger.info('running: '+cmd)
p = subprocess.Popen(cmd, shell=True, capture_output=True,
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
encoding='utf-8')
out, err = p.communicate()
if out:
Expand Down Expand Up @@ -718,7 +718,7 @@ def submit_jobs(self):
self.wait_for_job_completion(1)
self.logger.debug('submitting: '+( ' '.join(['{}']*(len(job)+2)).format(self.interpreter, self.script, *job) ))
p = subprocess.Popen([self.interpreter, self.script, *job],
capture_output=True, encoding='utf-8')
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8')
self.running_jobs.append((j,p))
self.pending_jobs = []
def wait_for_job_completion(self, count=None):
Expand Down Expand Up @@ -988,7 +988,7 @@ def wait_for_job_completion(self):
while True:
time.sleep(self.refresh_interval)
p = subprocess.Popen(('squeue', '-j '+self.job_id, '-h', '-o "%.18i %.2t %.10M %R"'),
capture_output=True, encoding='utf-8')
stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf-8')
out, err = p.communicate()
if err:
self.logger.error(err)
Expand Down

0 comments on commit 2606a4b

Please sign in to comment.