!JiiOHXrIUCtcOJsZCa:matrix.org

nio

342 Members
The nio matrix python library | Latest stable release 0.25.2 | https://pypi.org/project/matrix-nio/ | Documentation: https://matrix-nio.readthedocs.io/en/stable/133 Servers

Load older messages


SenderMessageTime
9 Oct 2024
@mooling:envs.netMooling | 木泠
In reply to @ifiguero:matrix.org

It's a warning from the async client. From the looks is on the send method.

for loggername in ["nio.responses", "nio.client.async_client", "nio.events.misc"]: 
    loggerloop = logging.getLogger(loggername) 
    if debug: 
        loggerloop.setLevel(logging.INFO) 
    else: 
        loggerloop.setLevel(logging.CRITICAL) 

To disable it. I increase the logger level so it doesn't show any of it. Critical mostly disable all of them IMHO

If the client does not receive any message for a long time, will this timed out warning be triggered?
03:51:36
@mooling:envs.netMooling | 木泠 Or is there another reason for this timed out warning? 03:52:07
@nex:nexy7574.co.uknex (she/it)If you set a limit on your sync timeout then yes, not receiving a sync response in x milliseconds will give you that warning You will also get that warning if you try to perform an operation that either the homeserver takes forever to respond to, or you have a poor network connection and the connection is dropped11:06:35
@nex:nexy7574.co.uknex (she/it)

That warning means that the previous request will be retried iirc. There's some related config options in [Async]ClientConfig

11:07:02
@nex:nexy7574.co.uknex (she/it) changed their display name from public static void main string args to #include<stdio.h>.11:21:08
10 Oct 2024
@nex:nexy7574.co.uknex (she/it) changed their display name from #include<stdio.h> to using System;.05:05:04
@nex:nexy7574.co.uknex (she/it) changed their display name from using System; to use "fmt".23:33:18
11 Oct 2024
@nex:nexy7574.co.uknex (she/it) changed their display name from use "fmt" to nex (she/it).01:49:01
@ifiguero:matrix.orgifiguero something like that, because the client<->server is HTTP, you kinda go back and forth, and if the server don't reply your request in a timeout then you probably have to retry it. That is implented on the AsyncClient on the async def _send method that also handles being rate limited by the server. 15:39:54
@ifiguero:matrix.orgifiguerogiven that its perfectly normal to ger a server timeout once in a while, and that the method already handles the retry by itself. it might serve you to diagnose in case poor connection or overloaded homeservr.15:41:08
18 Oct 2024
@winduu:matrix.orgJosh

Question About Power Levels

To modify power levels in nio, we need to use room_put_state event_type = "m.room.power_levels".

AFAIK: Synapse requires sending the full power level dictionary to the server when making modifications. Otherwise, values that are not explicitly set might get overwritten (or deleted). Is that correct?

I can’t seem to find a straightforward way to access this information in the correct schema structure, other than by fetching room events and modifying the last power level event as a base. The clients (rooms) have a PowerLevels object, but it doesn’t seem to fully represent the server schema.

It would be helpful to have a function that returns the server schema from here, perhaps something like a to_dict or to_json function. (Easy to implement, happy to do it)

Additionally, it appears that power levels in the object aren’t synced correctly; they seem to get updated only partially (this might be a separate issue).

Am I on the wrong track here? I’d appreciate clarification before opening a ticket. ;)

12:42:29
13 Oct 2024
@nex:nexy7574.co.uknex (she/it) Hey @Paarth Shah - Github Maintainer, are you still working on that PR that converts the dataclasses to pydantic objects? 10:04:47
@nex:nexy7574.co.uknex (she/it)I'm encountering some pain with dataclass validation errors and it has breathed a new life in my desire for pydantic 🥴10:05:13
18 Oct 2024
@mooling:envs.netMooling | 木泠 What happens when I cannot receive messages from Matrix after setting next_batch in client.sync_forever(timeout=5, since=next_batch)? 12:48:57
@mooling:envs.netMooling | 木泠If since=next_batch is not set, my program works fine.12:50:01
@winduu:matrix.orgJosh nex (she/it): Off Topic question. When did you send this message? It says Sunday 13.10 but gets shown after may last message from today? 12:59:18
@nex:nexy7574.co.uknex (she/it)
In reply to@winduu:matrix.org

Question About Power Levels

To modify power levels in nio, we need to use room_put_state event_type = "m.room.power_levels".

AFAIK: Synapse requires sending the full power level dictionary to the server when making modifications. Otherwise, values that are not explicitly set might get overwritten (or deleted). Is that correct?

I can’t seem to find a straightforward way to access this information in the correct schema structure, other than by fetching room events and modifying the last power level event as a base. The clients (rooms) have a PowerLevels object, but it doesn’t seem to fully represent the server schema.

It would be helpful to have a function that returns the server schema from here, perhaps something like a to_dict or to_json function. (Easy to implement, happy to do it)

Additionally, it appears that power levels in the object aren’t synced correctly; they seem to get updated only partially (this might be a separate issue).

Am I on the wrong track here? I’d appreciate clarification before opening a ticket. ;)

Can you not room_get_state m.room.power_levels and modify that?
12:52:42
@winduu:matrix.orgJoshBildschirmfoto 2024-10-18 um 14.59.52.png
Download Bildschirmfoto 2024-10-18 um 14.59.52.png
13:00:11
@nex:nexy7574.co.uknex (she/it)don't quote me on the function name12:52:46
@nex:nexy7574.co.uknex (she/it)
In reply to@winduu:matrix.org
nex (she/it): Off Topic question. When did you send this message? It says Sunday 13.10 but gets shown after may last message from today?
october 13th, 2024, at 11:04AM BST
13:00:49
@nex:nexy7574.co.uknex (she/it)
In reply to@nex:nexy7574.co.uk
october 13th, 2024, at 11:04AM BST
Are you running synapse by any chance?
13:00:56
@nex:envs.netnex (she/it) joined the room.13:01:35
@nex:envs.netnex (she/it).13:01:43
@nex:envs.netnex (she/it)cmon backfill13:01:47
@nex:envs.netnex (she/it)image.png
Download image.png
13:02:00
@nex:envs.netnex (she/it) CC Josh 13:02:07
@nex:envs.netnex (she/it)I've got federation issues with synapse servers from my homeserver for some reason. Presumably something I've configured wrong. The event will have only just come through because of backfil13:04:24
@nex:envs.netnex (she/it) * I've got federation issues with synapse servers from my homeserver for some reason. Presumably something I've configured wrong. The event will have only just come through because of backfill13:04:25
@winduu:matrix.orgJoshAh thanks! (Ill answer in this thread). No, just using elements with matrix acc, no fed, thus i was wondering.  Ahh, ok, that is extreme strange behavior, it should not be possible to forge timing via federation or at all.  13:11:04
@winduu:matrix.orgJosh
In reply to @nex:nexy7574.co.uk
don't quote me on the function name
I certainly could, but that is an extra request, for data that already is or should be available - thus not straightforward. The web clients don't do it either. - This why I thought I'm maybe doing something wrong.
13:15:01

Show newer messages


Back to Room ListRoom Version: 4