Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 676
    • Issues 676
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • PyPyPyPy
  • pypypypy
  • Issues
  • #3166
Closed
Open
Issue created Feb 06, 2020 by Bitbucket Importer@bitbucket_importerMaintainer

Wrong exception when calling `str` on an `integer` with an invalid encoding

Created originally on Bitbucket by Roy Williams

‌

$ pypy3 -c "str(1234, 'text')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
LookupError: unknown encoding: text
$ python3 -c "str(1234, 'text')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: decoding to str: need a bytes-like object, int found

This seems related to https://bitbucket.org/pypy/pypy/issues/2866/36-wrong-exception-while-calling-str-on

This is breaking flask_restful with pypy - https://github.com/flask-restful/flask-restful/blob/master/flask_restful/reqparse.py#L147-L156 . If self.type is a str flask_restful is expecting to get a TypeError as it tries a variety of different ways to parse the argument.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking