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

pssh-box.py parsing is not compatible with python3 #1227

Closed
allanlei opened this issue Jul 8, 2023 · 0 comments · Fixed by #1228 or #1312
Closed

pssh-box.py parsing is not compatible with python3 #1227

allanlei opened this issue Jul 8, 2023 · 0 comments · Fixed by #1228 or #1312
Labels
status: archived Archived and locked; will not be updated

Comments

@allanlei
Copy link
Contributor

allanlei commented Jul 8, 2023

System info

Operating System: Manjaro Linux
Shaka Packager Version: 2.6.1

Issue and steps to reproduce the problem

Extra steps to reproduce the problem?

  1. python3 pssh-box.py --from-base64 AAAAJHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAAAQiAhI0
    • python 3.11

What is the expected result?

PSSH Box v0
  System ID: Widevine edef8ba9-79d6-4ace-a3c8-27dcd51d21ed
  PSSH Data (size: 4):
    Widevine Data:
      Content ID: 1234

What happens instead?

Traceback (most recent call last):
  File "/usr/bin/pssh-box.py", line 438, in <module>
    main(sys.argv[1:])
  File "/usr/bin/pssh-box.py", line 396, in main
    boxes.extend(_parse_boxes(ns.input))
  File "/usr/bin/pssh-box.py", line 243, in _parse_boxes
    size = reader.read_int(4)
  File "/usr/bin/pssh-box.py", line 69, in read_int
    ret |= (ord(data[i]) << (8 * (size - i - 1)))
TypeError: ord() expected string of length 1, but int found

Using python2 is ok

allanlei added a commit to allanlei/shaka-packager that referenced this issue Jul 8, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Sep 10, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
1 participant