mrjob icon indicating copy to clipboard operation
mrjob copied to clipboard

Permission Error on Windows

Open HOLMEScdk opened this issue 6 years ago • 4 comments

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)

HOLMEScdk avatar May 02 '18 01:05 HOLMEScdk

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'): ...)

coyotemarin avatar May 04 '18 16:05 coyotemarin

Filed an issue, containing my resolution https://github.com/Yelp/mrjob/issues/1800

CloudChaoszero avatar Jul 07 '18 23:07 CloudChaoszero

has this bug been fixed?

sam3125C avatar Jul 18 '18 01:07 sam3125C

This issue has not been fixed. I rolled back to mrjob 0.5.10 and it's working for me now.

muilenta avatar Aug 17 '18 07:08 muilenta