Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

misleadingsetsockopt error message #107545

Closed
Labels
stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
@naweiss

Description

@naweiss

Bug report

Running the following code works:

importsocketwithsocket.socket()ass:s.setsockopt(socket.SOL_SOCKET,socket.SO_RCVBUF,2)

But if someone accidently passes a big value like so:

importsocketwithsocket.socket()ass:s.setsockopt(socket.SOL_SOCKET,socket.SO_RCVBUF,2**31)

He will get the follwing misleading error message:TypeError: a bytes-like object is required, not 'int'

Your environment

  • CPython versions tested on: 3.13.0a0
  • Operating system and architecture: x64 Ubuntu 20.04 LTS and Win10 x64 22H2

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp