Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

TypeError: "an integer is required" with Python 3.8 #31

Closed as not planned

Description

@mcorne

The following snippet produces "TypeError: an integer is required (got type bytes)" with Python 3.8.

Code snippet

from goto import with_goto
@with_goto
def main():
    label .label_rst

Error trace

TypeError: an integer is required (got type bytes)
File "env/lib/python3.8/site-packages/goto.py", line 184, in with_goto
  _patch_code(func_or_code.__code__),
File "env/lib/python3.8/site-packages/goto.py", line 175, in _patch_code
  return _make_code(code, buf.tostring())
File "env/lib/python3.8/site-packages/goto.py", line 53, in _make_code
  return types.CodeType(*args)

Activity

  1. judahbeethoven commented on Sep 27, 2020

    @judahbeethoven

    tell me what should i do

  2. mcorne commented on Oct 2, 2020

    @mcorne
    Author

    Wait until there is a fix for 3.8 or run with 3.6.

  3. mdfalcon104 commented on Oct 18, 2020

    @mdfalcon104

    I got the same issue on Python 3.8.6

  4. TabulateJarl8 commented on Feb 5, 2021

    @TabulateJarl8

    I fixed this in #34

  5. ibrahemesam commented on Jun 7, 2021

    @ibrahemesam

    I got the same error on Python 3.8.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions