Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 1
    Impressed with the signature thing Commented Jan 5, 2019 at 14:50
  • 10
    replace with b'\x50\x4b\x05\x06' to avoid TypeError: argument should be integer or bytes-like object, not 'str' Commented Dec 6, 2019 at 10:26
  • For other people, I'd recommend trying this solution first before trying the one below. I thought the one by UltramaticOrange is an improved version of this. It's not and they are different. Commented Mar 15, 2022 at 5:21
  • It gives the same error regardless of the filename. Commented May 7, 2022 at 18:34
  • This function won't run because self is undefined. What is self supposed to refer to in self._log(...? Is this supposed to go in some class? Commented Jul 21, 2023 at 15:45