spacetelescope/pandokia

Possible bug with PDK_CUSTOM

Closed this issue · 2 comments

Running pandokia in a set of HST engine tests, I get this traceback. It works when I explicitly set PDK_CUSTOM="" in the environment. Shouldn't it be clever enough to assume that when the variable is not explicitly defined in the environment?

(pyetc_tp22dev2_py36) [busko@etcbrady wfc3uvis]$ pdk run -r .
DEFAULT TEST RUN user_busko_2019-05-15-10-13-32
Traceback (most recent call last):
File "/data1/miniconda3/envs/pyetc_tp22dev2_py36/bin/pdk", line 4, in
import('pkg_resources').run_script('pandokia==2.4.1', 'pdk')
File "/data1/miniconda3/envs/pyetc_tp22dev2_py36/lib/python3.6/site-packages/pkg_resources/init.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/data1/miniconda3/envs/pyetc_tp22dev2_py36/lib/python3.6/site-packages/pkg_resources/init.py", line 1446, in run_script
exec(code, namespace, namespace)
File "/data1/miniconda3/envs/pyetc_tp22dev2_py36/lib/python3.6/site-packages/pandokia-2.4.1-py3.6.egg-info/scripts/pdk", line 46, in
sys.exit(pandokia.entry.run())
File "/data1/miniconda3/envs/pyetc_tp22dev2_py36/lib/python3.6/site-packages/pandokia/entry.py", line 182, in run
(err, lstat) = x.run(args)
File "/data1/miniconda3/envs/pyetc_tp22dev2_py36/lib/python3.6/site-packages/pandokia/run.py", line 137, in run
os.environ['PDK_CUSTOM'] = custom
File "/data1/miniconda3/envs/pyetc_tp22dev2_py36/lib/python3.6/os.py", line 674, in setitem
value = self.encodevalue(value)
File "/data1/miniconda3/envs/pyetc_tp22dev2_py36/lib/python3.6/os.py", line 744, in encode
raise TypeError("str expected, not %s" % type(value).name)
TypeError: str expected, not NoneType
(pyetc_tp22dev2_py36) [busko@etcbrady wfc3uvis]$

Yes, right now PDK_CUSTOM is required in the env. But I agree with you @ibusko that it could/should be optional.

CC @oiintam @vglaidler

(Side question - Vicki can we still create github tickets in these other repos?)

(Side question - Vicki can we still create github tickets in these other repos?)

At this time, yes.