GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — AttributeError: send_request. Did you mean: 'send_event'? · Issue #275 · python-xlib/python-xlib

AttributeError: send_request. Did you mean: 'send_event'? #275

New issue
Copy link
New issue
Copy link
Open
Open
AttributeError: send_request. Did you mean: 'send_event'?#275
Copy link

Description

@funicat1
funicat1
opened on Sep 6, 2024
Issue body actions

I am trying to just move a window, but i get an error:

xeyes
524298
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 224, in __getattr__
    function = self.display_extension_methods[attr]
KeyError: 'send_request'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/tnb/PWM/main.py", line 19, in <module>
    win.configure(x=123, y=345)
  File "/usr/lib/python3/dist-packages/Xlib/xobject/drawable.py", line 408, in configure
    request.ConfigureWindow(display = self.display,
  File "/usr/lib/python3/dist-packages/Xlib/protocol/rq.py", line 1349, in __init__
    display.send_request(self, onerror is not None)
  File "/usr/lib/python3/dist-packages/Xlib/display.py", line 227, in __getattr__
    raise AttributeError(attr)
AttributeError: send_request. Did you mean: 'send_event'?

Heres my code:

from Xlib import X
from Xlib.display import Display
from Xlib import xobject

display = Display()
screen = display.screen()
root = screen.root
# get all windows
for window in root.query_tree().children:
    print(window.get_wm_name())
    # get window geometry
    geom = window.get_geometry()._data
    # check if y < 15
    if geom["y"] < 15:
        # move window a bit
        id = window.id
        print(id)
        win = xobject.drawable.Window(display, id)
        win.configure(x=123, y=345)

I think it may be a bug.

Reacted by read with ai

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.