payu-org / payu

A workflow management tool for numerical models on the NCI computing systems
Apache License 2.0
18 stars 26 forks source link

ghsetup fails due to python3 incompatibility #219

Open aidanheerdegen opened 4 years ago

aidanheerdegen commented 4 years ago

ghsetup failed when I had the following remotes defined

$ git remote -v
origin  /home/502/aph502/scratch_v45/HenkTestRun (fetch)
origin  /home/502/aph502/scratch_v45/HenkTestRun (push)

with this error message

Traceback (most recent call last):
  File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-20.01/bin/payu", line 10, in <module>
    sys.exit(parse())
  File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-20.01/lib/python3.7/site-packages/payu/cli.py", line 60, in parse
    run_cmd(**args)
  File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-20.01/lib/python3.7/site-packages/payu/subcommands/ghsetup_cmd.py", line 23, in runcmd
    expt.runlog.github_setup()
  File "/g/data3/hh5/public/apps/miniconda3/envs/analysis3-20.01/lib/python3.7/site-packages/payu/runlog.py", line 223, in github_setup
    for r in git_remote_out.split('\n') if r])
TypeError: a bytes-like object is required, not 'str'
angus-g commented 4 years ago

Looks like it would fail regardless of the remotes? subprocess.check_output() returns bytes, which you can't split by a string.

aidanheerdegen commented 4 years ago

Yeah, maybe. I sort of assumed it must have worked at some point, but maybe I never ran that command under python3.x

aidanheerdegen commented 4 years ago

Yeah confirmed same error regardless of remote. Deleted remotes got the same error.

I liked ASCII.