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

UnicodeDecodeError happens if unicode is not used #261

Open
kmyk opened this issue May 12, 2020 · 0 comments
Open

UnicodeDecodeError happens if unicode is not used #261

kmyk opened this issue May 12, 2020 · 0 comments
Labels

Comments

@kmyk
Copy link
Member

kmyk commented May 12, 2020

Japanese users on Windows may use CP932 and get this error

INFO:onlinejudge_verify.main:generate documents...
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.2/x64/bin/oj-verify", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/onlinejudge_verify/main.py", line 209, in main
    subcommand_docs()
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/onlinejudge_verify/main.py", line 157, in subcommand_docs
    onlinejudge_verify.docs.main()
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 730, in main
    PagesBuilder(cpp_source_pathstr='.', config=config)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 472, in __init__
    self.library_files = self.get_files(cpp_source_path, ignored_files=self.verify_files)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 535, in get_files
    if not self.is_ignored(path):
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 520, in is_ignored
    parser = FileParser(file_path)
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 47, in __init__
    self.lines = [line.decode().strip() for line in f.readlines()]
  File "/opt/hostedtoolcache/Python/3.8.2/x64/lib/python3.8/site-packages/onlinejudge_verify/docs.py", line 47, in <listcomp>
    self.lines = [line.decode().strip() for line in f.readlines()]
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 37: invalid start byte
##[error]Process completed with exit code 1.

https://github.com/null0124/CompetitiveProgramming/runs/668146062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant