Error in the library samp-client

In my Discord Bot I use the samp-client library.
However, the result is unsuccessful and displays this: ‘NoneType’ object is not subscriptable
As I understand it, for some reason the server data is not transmitted.

Everything should work, since this code works stably on my PC and on other hosting
Repl link:

@bot.slash_command(name='online_arz', description='Отображает количество игроков в игре на Arizona RP')
async def online_arz(ctx, сервер: Option(str, description='Выберите Сервер из списка (не обязательно)', required=False):
    global gr, rd, arze, peop, eng, status, online, ip, gamemode
    if == '..:::Golden-Family:::..':
        gr = '<:green_point:1121111582726963300>'
        rd = '<:red_point:1121111956032594060>'
        peop = '<:peoples:1102164414213398619>'
        eng = '<:engine:1102164894826102814>'
        arze = '<:arz:1074594678307037224>'
    elif == 'Семья Бомжей':
        gr = '<:green_point:1136709953508347945>'
        rd = '<:red_point:1136709881781563535>'
        peop = '<:peoples:1136711393555513456>'
        eng = '<:engine:1136710941401161889>'
        arze = '<:arz:1136909645789810829>'
    await ctx.defer()
    choice = сервер

    if choice == None or choice == 'ALL':
            with SampClient(address='', port=7777) as client:
                first_server = str(client.get_server_info())
                first_server = list(first_server.split(', '))
                ip1 = ''
                online1 = int((first_server[1])[8:])
                gamemode1 = ((first_server[4])[10:]).replace("'", "")
                if online1 != 0:
                    status1 = f'{gr} Статус: online'
                    status1 = f'{rd} Статус: offline'
        except Exception as e:
            online1 = 0
            ip1 = ''
            gamemode1 = 'X0'
            status1 = f'{rd} Статус: offline'

        online = (online1)

        onlinearz_embed = discord.Embed(title=f'{arze} Информация по Серверам Arizona RP',
                                        colour=discord.Color(int('ff0000', 16)))
        onlinearz_embed.add_field(name='Общий онлайн',
                                  value=f'> {gr} Онлайн: {online}/26000', inline=False)
        onlinearz_embed.add_field(name='ARZ Phoenix (#1)', value=f'>>> {status1}\n'
                                                                 f'{peop} Онлайн: {online1}/1000\n'
                                                                 f'IP Сервера: {ip1}\n'
                                                                 f'{eng} Режим: {gamemode1}',
        await ctx.respond(embed=onlinearz_embed)

*There are actually 26 servers, but they all have the same error

The code you sent has invalid syntax. I found the repl here.
:person_shrugging: Looks like other replers have experienced the issue:

But even when I send a request to your ip1 from my local computer, I get:

No connection could be made because the target machine actively refused it.

1 Like

I’m sorry, but I didn’t understand how I can fix this error?

He’s saying that your server is not reachable.

Which means that the server is not running, or there’s some firewall blocking, or that you are using an incorret IP address and port.

The fix is making your server be reachable.

The server is available, since everything works stably from my PC (I check from my PC at the same minute).

The IP address and port are correct.

How can I find out if there is a firewall lock?

Help me please!

I really want to fix this problem!