mrjob
mrjob copied to clipboard
Permission Error on Windows
from mrjob.job import MRJob class MRWordCount(MRJob): def mapper(self, _, line): for word in line.split(): yield(word, 1) def reducer(self, word, counts): yield(word, sum(counts)) if __name__ == '__main__': MRWordCount.run()
I ran the code on windows (it's ok when it was run on linux), and it told me I occured the problem which is permissionError . PermissionError: [WinError 5] 拒绝访问。: 'C:\Users\K_HOLM~1\AppData\Local\Temp\mrjob_test.K_HOLMES_.20180502.012212.421639\step\000\cache\mrjob_test.py'
And I know it's about the authority, but I used the admin to run the code, it still can't work. How can I change the default directory to make it? (Python 3.6, pip install mrjob, win 10)
I'm guessing it has something to do with symlinks? Check out _symlink_or_copy
in mrjob/sim.py
, and see what happens if you comment out the portion that calls os.symlink
(if hasattr(os, 'symlink'): ...
)
Filed an issue, containing my resolution https://github.com/Yelp/mrjob/issues/1800
has this bug been fixed?
This issue has not been fixed. I rolled back to mrjob 0.5.10 and it's working for me now.