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

JSONDecodeError: Extra Data Raised on Long Valid JSON #87973

Closed
UnknownRetiredGuy mannequin opened this issue Apr 11, 2021 · 2 comments
Closed

JSONDecodeError: Extra Data Raised on Long Valid JSON #87973

UnknownRetiredGuy mannequin opened this issue Apr 11, 2021 · 2 comments
Labels
3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@UnknownRetiredGuy
Copy link
Mannequin

UnknownRetiredGuy mannequin commented Apr 11, 2021

BPO 43807
Nosy @rhettinger, @ronaldoussoren, @ezio-melotti
Files
  • pico-hard.json: Long Vaild JSON
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2021-04-11.12:25:48.305>
    labels = ['3.7', 'type-bug', 'library']
    title = 'JSONDecodeError: Extra Data Raised on Long Valid JSON'
    updated_at = <Date 2021-04-16.20:24:29.323>
    user = 'https://bugs.python.org/UnknownRetiredGuy'

    bugs.python.org fields:

    activity = <Date 2021-04-16.20:24:29.323>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Library (Lib)']
    creation = <Date 2021-04-11.12:25:48.305>
    creator = 'UnknownRetiredGuy'
    dependencies = []
    files = ['49953']
    hgrepos = []
    issue_num = 43807
    keywords = []
    message_count = 2.0
    messages = ['390781', '390783']
    nosy_count = 4.0
    nosy_names = ['rhettinger', 'ronaldoussoren', 'ezio.melotti', 'UnknownRetiredGuy']
    pr_nums = []
    priority = 'normal'
    resolution = None
    stage = None
    status = 'open'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43807'
    versions = ['Python 3.7']

    @UnknownRetiredGuy
    Copy link
    Mannequin Author

    UnknownRetiredGuy mannequin commented Apr 11, 2021

    https://i.ibb.co/tYqBsQ8/pico-hard.png

    That JSONDecodeError: Extra Data is raised when the Valid JSON is too long or over than 25000 bytes, I don't know what caused this, can you fix it?

    The code and the traceback is in that picture/link above in this comment and the long valid JSON is provided here.

    The Below picture/link proof that it's a valid JSON:
    https://i.ibb.co/fGytRFC/946.png

    @UnknownRetiredGuy UnknownRetiredGuy mannequin added 3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Apr 11, 2021
    @ronaldoussoren
    Copy link
    Contributor

    There is a block of NUL bytes at the end of the JSON data structure

    The output of "od -c pico-hard.json" ends with:

    0046340 s e c t i o n N o t e s " : [ ]
    0046360 , " t y p e O f S e c t i o n "
    0046400 : 0 } ] } \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
    0046420 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
    *
    0071600 \0 \0 \0 \0 \0 \0 \0 \0 \0
    0071611

    Note that there is a block of "\0" entries after the closing "}".

    The file can be parsed correctly after stripping these NUL bytes.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    @methane methane closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    Status: Done
    Development

    No branches or pull requests

    2 participants