dsub icon indicating copy to clipboard operation
dsub copied to clipboard

Error when using dsub on windows

Open aknandi opened this issue 7 years ago • 1 comments

Hi,

I cannot use dsub on windows (I have no problems when I use linux). It seems that dsub_util.py tries to import pwd, and this module is only available on unix. The error message is below.

Could this be changed to be compatible with windows?

Thanks, Anita

$ dsub --help Traceback (most recent call last): File "C:\Users\anitan\AppData\Local\Programs\Python\Python37\Scripts\dsub-script.py", line 11, in load_entry_point('dsub==0.2.1', 'console_scripts', 'dsub')() File "C:\Users\anitan\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources_init_.py", line 480, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "C:\Users\anitan\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources_init_.py", line 2693, in load_entry_point return ep.load() File "C:\Users\anitan\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources_init_.py", line 2324, in load return self.resolve() File "C:\Users\anitan\AppData\Local\Programs\Python\Python37\lib\site-packages\pkg_resources_init_.py", line 2330, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "C:\Users\anitan\AppData\Local\Programs\Python\Python37\lib\site-packages\dsub-0.2.1-py3.7.egg\dsub\commands\dsub.py", line 31, in from ..lib import dsub_util File "C:\Users\anitan\AppData\Local\Programs\Python\Python37\lib\site-packages\dsub-0.2.1-py3.7.egg\dsub\lib\dsub_util.py", line 23, in import pwd ModuleNotFoundError: No module named 'pwd'

aknandi avatar Oct 31 '18 11:10 aknandi

Thanks for reporting Anita.

There is a suggested fix for this here that looks straight forward. You could try updating your local copy of dsub_util.py (the get_os_user() function) in the same way.

mbookman avatar Nov 02 '18 21:11 mbookman