hummerstudio / jenkinsclient

A powerful cross-platform Jenkins command-line client which supports multiple instances of Jennkins
https://pypi.org/project/jenkinsclient
Other
4 stars 1 forks source link

Error "KeyError: 'HOMEDRIVE'" when execute jenkins command #1

Open wwyhy opened 3 years ago

wwyhy commented 3 years ago

Hi,

I followed the install instruction to installed the jenkinsclient, but always got error when i execute any jenkins commands. Could you please help on this issue?

[root@Wayne jenkins]# jenkins config generate
Traceback (most recent call last):
  File "/usr/local/bin/jenkins", line 7, in <module>
    from jenkins_client import main
  File "/usr/local/lib/python3.6/site-packages/jenkins_client.py", line 14, in <module>
    from jenkinsclient.credentials import Credentials
  File "/usr/local/lib/python3.6/site-packages/jenkinsclient/__init__.py", line 10, in <module>
    from jenkinsclient import (
  File "/usr/local/lib/python3.6/site-packages/jenkinsclient/config.py", line 26, in <module>
    HOME_PATH = os.environ['HOMEDRIVE'] + os.environ['HOME']
  File "/usr/lib64/python3.6/os.py", line 669, in __getitem__
    raise KeyError(key) from None
KeyError: 'HOMEDRIVE'

Thanks! Br, Wayne

wwyhy commented 3 years ago

It works on Windows, does it support Linux?

hummerstudio commented 3 years ago

@wwyhy Hello, I have released version 1.5.5 on October 31, 2020. This version fixes the problem that the home directory cannot be obtained correctly on the Mac. I guess this fix is also valid for Linux. Can you upgrade and see if the problem is resolved?