python-goto icon indicating copy to clipboard operation
python-goto copied to clipboard

TypeError: "an integer is required" with Python 3.8

Open mcorne opened this issue 4 years ago • 5 comments

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)

mcorne avatar May 20 '20 12:05 mcorne

tell me what should i do

itzB2 avatar Sep 27 '20 08:09 itzB2

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

mcorne avatar Oct 02 '20 12:10 mcorne

I got the same issue on Python 3.8.6

dlpigpen avatar Oct 18 '20 08:10 dlpigpen

I fixed this in #34

TabulateJarl8 avatar Feb 05 '21 00:02 TabulateJarl8

I got the same error on Python 3.8.4

ibrahemesam avatar Jun 07 '21 00:06 ibrahemesam