英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论