No module named 'pwd'
Closed this issue · 5 comments
OS: Win 8.1 x64
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
:ve
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jul 2 2018 23:12:58)
MS-Windows 64-bit GUI version with OLE support
Included patches: 1-139
Compiled by micbou <contact@micbou.com>
...
:mess
output:
Error detected while processing C:\Users\User\vimfiles\bundle\vim-netranger\plugin\netranger.vim:
line 25:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Neil\vimfiles\bundle\vim-netranger\pythonx\netranger\netranger.py", line 16, in <module>
import pwd
ModuleNotFoundError: No module named 'pwd'
line 26:
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'Netranger' is not defined
Error detected while processing CursorMoved Autocommands for "*":
Traceback (most recent call last):
File "<string>", line 1, in <module>
Error detected while processing CursorMoved Autocommands for "*":
NameError: name 'ranger' is not defined
...
Also auto commands in NETRANGER augroup maybe should work only inside netranger buffer, not every buffer?
This should be a python distribution problem. I don't have access to windows platform now and I only have experience using vim with cygwin. So possibly there is going to be a delay on fixing this issue.
As for the augroup, you're right on that. I'll see if I can add an if statement.
pwd and grp availiable only on Unix python verisons. Closing issue since nobody will going to port them to windows anyway. Maybe README should mention that vim-netranger will only work under Linux or cygwin.
It's possible just to avoid showing user and group info on windows platform. I guess we only need to put the import in re_stat and modify it properly.
Hm yeah, they can be replaced with something like os.getenv("USERNAME")
and os.getenv("USERDOMAIN")
.
Reopen for further discussion and possible enhancement.