I was able to reproduce part of the problem (though not the same error message) within a mostly bare CentOS 7 docker container.
[root@6c1f958d20a2 /]# python
Python 2.7.5 (default, Aug 4 2017, 00:39:18)Â
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.>>> import htcondor
Neither the environment variable CONDOR_CONFIG,
/etc/condor/, /usr/local/etc/, nor ~condor/ contain a condor_config source.
Either set CONDOR_CONFIG to point to a valid config source,
or put a "condor_config" file in /etc/condor/ /usr/local/etc/ or ~condor/
>>> htcondor.version()
'$CondorVersion: 8.7.4 Oct 30 2017 BuildID: UW_development $'
>>> c = htcondor.Collector('***.
wisc.edu')
>>> c.query(htcondor.AdTypes.Collector)
Can't find "condor" in the password file and CONDOR_IDS not defined in condor_config or as an environment variable.
[root@6c1f958d20a2 /]# # python interpreter was killed
I was able to work around this by making an empty file and pointing CONDOR_CONFIG to it:
[root@6c1f958d20a2 /]# touch condor_config
[root@6c1f958d20a2 /]# export CONDOR_CONFIG=$(pwd)/condor_config
[root@6c1f958d20a2 /]# python
Python 2.7.5 (default, Aug 4 2017, 00:39:18)Â
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import htcondor
>>> c.query(htcondor.AdTypes.Collector)
[[ RecentUpdatesTotal_Negotiator = 3; AddressV1 = ....
Give that a try and see if it works. I will see about putting a check for this situation in the pip package so that it's not completely useless if it doesn't find a config.
Jason Patton