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

Error on autotype with Flatpak app on Ubuntu - ModuleNotFoundError: No module named 'Xlib' #210

Closed
MurzNN opened this issue May 10, 2024 · 5 comments
Labels
bug Something isn't working needs testing

Comments

@MurzNN
Copy link

MurzNN commented May 10, 2024

When I'm trying to make autotype on the goldwaren installed from Flatpak, I get an error in the console:

/app/bin/src/gui/quickaccess.py:159: DeprecationWarning: Adw.ActionRow.set_icon_name is deprecated
  action_row.set_icon_name("dialog-password")
/app/bin/src/gui/quickaccess.py:113: DeprecationWarning: Gtk.Widget.hide is deprecated
  self.window.hide()
Exception in thread Thread-2 (perform_autotype):
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/app/bin/src/gui/quickaccess.py", line 115, in perform_autotype
    autotype.autotype(text)
  File "/app/bin/src/services/autotype/autotype.py", line 12, in autotype
    from .x11autotype import type
  File "/app/bin/src/services/autotype/x11autotype.py", line 27, in <module>
    from Xlib.display import Display
ModuleNotFoundError: No module named 'Xlib'

Installing the xlib library locally like this:

$ sudo apt install python3-xlib

doesn't help, seems because Python checks it in the Flatpak namespace.

@quexten
Copy link
Owner

quexten commented May 10, 2024

Hmm, weird:

{
"name": "python3-python3-xlib",
"buildsystem": "simple",
"build-commands": [
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"python3-xlib==0.15\" --no-build-isolation"
],
"sources": [
{
"type": "file",
"url": "https://files.pythonhosted.org/packages/ef/c6/2c5999de3bb1533521f1101e8fe56fd9c266732f4d48011c7c69b29d12ae/python3-xlib-0.15.tar.gz",
"sha256": "dc4245f3ae4aa5949c1d112ee4723901ade37a96721ba9645f2bfa56e5b383f8"
}
]
}

Gonna have to do some tests on an xorg system for this.

@quexten quexten added the bug Something isn't working label May 10, 2024
@quexten
Copy link
Owner

quexten commented May 10, 2024

Oh, my bad. Seems it was not added on the FlatHub python3-requirements.json. Should be an easy fix.

@quexten
Copy link
Owner

quexten commented May 10, 2024

Should be fixed on next release.

@quexten
Copy link
Owner

quexten commented May 11, 2024

0.3.2 is out now, should be on FlatHub within a few hours. Please try again there.

@MurzNN
Copy link
Author

MurzNN commented May 29, 2024

Confirm, now autotype working well on Flatpak with KDE on Ubuntu 23.10 Linux, thanks!

@MurzNN MurzNN closed this as completed May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs testing
Projects
None yet
Development

No branches or pull requests

2 participants