Skip to content

'WindowEvent' has no attribute 'replace' #181

Open

Description

@hernan3009

Hi,

I am trying to automatically perform font size changes in the terminal when its window is anyhow resized. I get AtributeError with this short code

from i3ipc import Connection, Event
import i3ipc

i3 = Connection()
def is_resizing(i3, e):
    print("lets see")
    return

i3.on(i3ipc.WindowEvent, is_resizing)

i3.main()

It returns
File "/home/XXXXX/Aplicaciones/miniconda3/lib/python3.9/site-packages/i3ipc/connection.py", line 375, in on
event = event.replace('-', '_')
AttributeError: type object 'WindowEvent' has no attribute 'replace'

I tried to comment the line no. 375 but similar errors still remains.

Is this a bug or I am doing something wrong?

Thanks!

Note: The same happens for WorkspaceEvent
sway version 1.5.1
Fedora 34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions