Cannot create a client socket with a PROTOCOL_TLS_SERVER context while trying to rank a player in-group

huangapple go评论95阅读模式
英文:

Cannot create a client socket with a PROTOCOL_TLS_SERVER context while trying to rank a player in-group

问题

The code you provided is used to rank a player to another rank in a Roblox group using a bot. However, it's encountering an SSL error. Here's the translated error message:

"ssl.SSLError: 无法创建带有 PROTOCOL_TLS_SERVER 上下文的客户端套接字 (_ssl.c:795)"

If you have any specific questions or need further assistance with this code, please let me know.

英文:
import robloxapi

async def grouprank(userId, rankName):
    # omitted rank-name to role id mapping
    rankId = dic[rankName]
    client = robloxapi.Client(cookie=NOT_STUPID_ENOUGH_TO_DISCLOSE)
    grp = await client.get_group(32409863)
    await robloxapi.client.Group.set_rank_by_id(grp, userId, rankId)

import asyncio
lp = asyncio.new_event_loop()
lp.run_until_complete(grouprank(2315210162, "Recruit"))

The code above throws the following error:
ssl.SSLError: Cannot create a client socket with a PROTOCOL_TLS_SERVER context (_ssl.c:795)

This code is mainly to rank a player to another rank in a roblox group using a bot

答案1

得分: 1

这是ssl库中已知的问题,有很多GitHub问题与此相关。例如,这个问题是一个示例问题。对我来说,在以前的项目中,通过使用ssl._create_default_https_context = ssl._create_unverified_context可以解决。我不知道它是否适用于Roblox,因为我无法访问它。

英文:

This is a known issue in the ssl library and there are MANY GitHub issues based on this. For example, this one is a sample issue. For me, it worked by using ssl._create_default_https_context = ssl._create_unverified_context in previous projects. Idk if it will work for Roblox because I don't have access to it.

huangapple
  • 本文由 发表于 2023年5月21日 10:52:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/76298101.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定