Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to run zippy -h #13

Open
vivekprajapati2048 opened this issue May 8, 2024 · 1 comment
Open

[BUG] Unable to run zippy -h #13

vivekprajapati2048 opened this issue May 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@vivekprajapati2048
Copy link

I want to implement this repository. I cloned it on my windows machine and followed Readme.md file for the installation using pip3. However, after successful installation, I ran into following error while trying to run zippy -h:

(venv) C:\Users\HP\PycharmProjects\zippy>zippy -h 
Traceback (most recent call last):
  File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main                              
    return _run_code(code, main_globals, None,                                                                                           
  File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code                                         
    exec(code, run_globals)                                                                                                              
  File "C:\Users\HP\PycharmProjects\zippy\venv\Scripts\zippy.exe\__main__.py", line 4, in <module>      
  File "C:\Users\HP\PycharmProjects\zippy\venv\lib\site-packages\zippy\__init__.py", line 1, in <module>
    from .zippy import *
  File "C:\Users\HP\PycharmProjects\zippy\venv\lib\site-packages\zippy\zippy.py", line 44, in <module>
    PRELUDE_STR = clean_text(files('zippy').joinpath(PRELUDE_FILE).read_text())
  File "C:\Users\HP\AppData\Local\Programs\Python\Python310\lib\pathlib.py", line 1135, in read_text
    return f.read()
  File "C:\Users\HP\AppData\Local\Programs\Python\Python310\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 54323: character maps to <undefined>

Can you please let me know if there is any step which I am missing?

@vivekprajapati2048 vivekprajapati2048 added the bug Something isn't working label May 8, 2024
@ranok
Copy link
Collaborator

ranok commented May 9, 2024

Thank you @vivekprajapati2048 for reporting this. It appears that I need to explicitly set a character encoding when reading files. I will make a couple fixes and ping you shortly to retest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants