Visitar URL original
Xlib.error.DisplayNameError: Bad display name "" · Issue #156 · python-xlib/python-xlib · GitHub
The Wayback Machine - https://web.archive.org/web/20210106130916/https://github.com/python-xlib/python-xlib/issues/156
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xlib.error.DisplayNameError: Bad display name "" #156

Open
shuyuei opened this issue Dec 13, 2019 · 0 comments
Open

Xlib.error.DisplayNameError: Bad display name "" #156

shuyuei opened this issue Dec 13, 2019 · 0 comments

Comments

@shuyuei
Copy link

@shuyuei shuyuei commented Dec 13, 2019 •

>>> import ait
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/ait/__init__.py", line 1, in <module>
    from .ait import click, mouse, move, press, write, log
  File "/usr/local/lib/python3.7/site-packages/ait/ait.py", line 202, in <module>
    log = Logger()
  File "/usr/local/lib/python3.7/site-packages/ait/logger.py", line 13, in __init__
    self.local_dpy = Xlib.display.Display()
  File "/usr/local/lib/python3.7/site-packages/Xlib/display.py", line 89, in __init__
    self.display = _BaseDisplay(display)
  File "/usr/local/lib/python3.7/site-packages/Xlib/display.py", line 71, in __init__
    protocol_display.Display.__init__(self, *args, **keys)
  File "/usr/local/lib/python3.7/site-packages/Xlib/protocol/display.py", line 85, in __init__
    name, protocol, host, displayno, screenno = connect.get_display(display)
  File "/usr/local/lib/python3.7/site-packages/Xlib/support/connect.py", line 73, in get_display
    return mod.get_display(display)
  File "/usr/local/lib/python3.7/site-packages/Xlib/support/unix_connect.py", line 61, in get_display
    raise error.DisplayNameError(display)
Xlib.error.DisplayNameError: Bad display name ""

This is on a Macbook Pro using Darwin. I think the code looks for the display here but it's not there?:

$ ls -a /private/tmp/com.apple.launchd.Fh8wv6hzSw/
.		..		Listeners
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.