xls-cli icon indicating copy to clipboard operation
xls-cli copied to clipboard

pip3 error: 'charmap' codec can't decode byte 0x81 in position 876

Open hunsbct opened this issue 5 years ago • 3 comments

Even after upgrading pip to the latest version I'm getting this error when I attempt to install:

λ pip3 install xls-cli
Collecting xls-cli
  Using cached xls_cli-1.0.2-py3-none-any.whl (5.3 kB)
Collecting getkey
  Using cached getkey-0.6.5.tar.gz (13 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\chunsberger\\AppData\\Local\\Temp\\pip-install-2p3rqeim\\getkey\\setup.py'"'"'; __file__='"'"'C:\\Users\\chunsberger\\AppData\\Local\\Temp\\pip-install-2p3rqeim\\getkey\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\chunsberger\AppData\Local\Temp\pip-install-2p3rqeim\getkey\pip-egg-info'
         cwd: C:\Users\chunsberger\AppData\Local\Temp\pip-install-2p3rqeim\getkey\
    Complete output (9 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\chunsberger\AppData\Local\Temp\pip-install-2p3rqeim\getkey\setup.py", line 37, in <module>
        long_description=read_description(),
      File "C:\Users\chunsberger\AppData\Local\Temp\pip-install-2p3rqeim\getkey\setup.py", line 11, in read_description
        return fd.read()
      File "c:\python38\lib\encodings\cp1252.py", line 23, in decode
        return codecs.charmap_decode(input,self.errors,decoding_table)[0]
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 876: character maps to <undefined>
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

hunsbct avatar Feb 04 '20 14:02 hunsbct

@hunsbct thanks for reporting, I'm going to check the windows compatibility

joelibaceta avatar Feb 04 '20 14:02 joelibaceta

@joelibaceta Your app is cool! But, I got this error while accessing a xls doc from ms word 2003. Isn't it supported?

Traceback (most recent call last):
  File "/home/sk/.local/bin/xls-cli", line 8, in <module>
    sys.exit(main())
  File "/home/sk/.local/lib/python3.8/site-packages/xls_cli/cli.py", line 18, in main
    Runner.open_file(ARGS.file)
  File "/home/sk/.local/lib/python3.8/site-packages/xls_cli/runner.py", line 9, in open_file
    book = xlrd.open_workbook(file_path)
  File "/home/sk/.local/lib/python3.8/site-packages/xlrd/__init__.py", line 148, in open_workbook
    bk = book.open_workbook_xls(
  File "/home/sk/.local/lib/python3.8/site-packages/xlrd/book.py", line 92, in open_workbook_xls
    biff_version = bk.getbof(XL_WORKBOOK_GLOBALS)
  File "/home/sk/.local/lib/python3.8/site-packages/xlrd/book.py", line 1278, in getbof
    bof_error('Expected BOF record; found %r' % self.mem[savpos:savpos+8])
  File "/home/sk/.local/lib/python3.8/site-packages/xlrd/book.py", line 1272, in bof_error
    raise XLRDError('Unsupported format, or corrupt file: ' + msg)
xlrd.biffh.XLRDError: Unsupported format, or corrupt file: Expected BOF record; found b'From: Cr'

kskarthik avatar Jun 27 '20 17:06 kskarthik

@kskarthik xls files should be open with ms excel.

joelibaceta avatar Jun 29 '20 06:06 joelibaceta