TheProfosist

Directory Listing with size (no sub folders) via Python 05

Jul 1st, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PS E:\> python getDirSize.py
  2. running on dir "."
  3. Traceback (most recent call last):
  4.   File "getDirSize.py", line 31, in <module>
  5.     listContents();
  6.   File "getDirSize.py", line 23, in listContents
  7.     f.write(c)
  8.   File "C:\Users\Owner\AppData\Local\Programs\Python\Python36\lib\encodings\cp1252.py", line 19, in encode
  9.     return codecs.charmap_encode(input,self.errors,encoding_table)[0]
  10. UnicodeEncodeError: 'charmap' codec can't encode characters in position 11-21: character maps to <undefined>
Add Comment
Please, Sign In to add comment