LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-07-2019, 02:08 PM   #1
The_Dark_Passenger
Member
 
Registered: Apr 2018
Distribution: Slackware64 14.2 & -Current
Posts: 58

Rep: Reputation: Disabled
Unable to run AutoKey on Slackware64 -current


Hello,

I am trying to get AutoKey running on Slackware64 -current so I can automate some writing for my job.

I have installed the required dependencies, Qt5, PyQt5, Xlib.

However, when I try to run the application this occurs.
Code:
user@hostname:~/Downloads/autokey-master/lib$ python3 -m autokey.qtui
UserWarning: Compiled Qt resources file not found. If autokey is launched directly from the source directory, this is expected and harmless. If not, this indicates a failure in the resource compilation.
  warnings.warn(warn_msg)
Traceback (most recent call last):
  File "/usr/lib64/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/a2work/Downloads/autokey-master/lib/autokey/qtui/__main__.py", line 23, in <module>
    from autokey.qtapp import Application
  File "/home/a2work/Downloads/autokey-master/lib/autokey/qtapp.py", line 41, in <module>
    from autokey.qtui.configwindow import ConfigWindow
  File "/home/a2work/Downloads/autokey-master/lib/autokey/qtui/configwindow.py", line 40, in <module>
    class ConfigWindow(*autokey.qtui.common.inherits_from_ui_file_with_name("mainwindow")):
  File "/home/a2work/Downloads/autokey-master/lib/autokey/qtui/common.py", line 146, in load_ui_from_file
    base_type = uic.loadUiType(ui_file, from_imports=True)
  File "/usr/lib64/python3.7/site-packages/PyQt5/uic/__init__.py", line 202, in loadUiType
    exec(code_string.getvalue(), ui_globals)
  File "<string>", line 292, in <module>
  File "/home/a2work/Downloads/autokey-master/lib/autokey/qtui/centralwidget.py", line 35, in <module>
    class CentralWidget(*ui_common.inherits_from_ui_file_with_name("centralwidget")):
  File "/home/a2work/Downloads/autokey-master/lib/autokey/qtui/common.py", line 146, in load_ui_from_file
    base_type = uic.loadUiType(ui_file, from_imports=True)
  File "/usr/lib64/python3.7/site-packages/PyQt5/uic/__init__.py", line 202, in loadUiType
    exec(code_string.getvalue(), ui_globals)
  File "<string>", line 67, in <module>
  File "/home/a2work/Downloads/autokey-master/lib/autokey/qtui/scriptpage.py", line 20, in <module>
    from PyQt5 import Qsci
ImportError: cannot import name 'Qsci' from 'PyQt5' (/usr/lib64/python3.7/site-packages/PyQt5/__init__.py)
I checked to ensure that qscintilla is installed, it is.
Code:
root@Canned:~$ pip3 install qscintilla
Requirement already satisfied: qscintilla in /usr/lib64/python3.7/site-packages (2.10.8)
I'm a bit stumped as to why it is not able to import Qsci from PyQt5. Is there any other packages I maybe missing that is causing the application to be unable to run on Slackware64 -current?

Any help would be appreciated. Thank you.
 
Old 08-08-2019, 04:43 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,357

Rep: Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146
Quote:
ImportError: cannot import name 'Qsci' from 'PyQt5' (/usr/lib64/python3.7/site-packages/PyQt5/__init__.py)
Quote:
Requirement already satisfied: qscintilla in /usr/lib64/python3.7/site-packages (2.10.8)
It strikes me the program isn't looking at qscintilla, but at PyQt5. There's a hell of a lot of modules in there. Maybe examine that?
 
Old 08-08-2019, 04:53 AM   #3
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 4,891

Rep: Reputation: Disabled
I haven't tried it myself, but looking at the link below the dependencies look to be some more...

https://aur.archlinux.org/packages/autokey/
 
Old 08-08-2019, 06:14 AM   #4
The_Dark_Passenger
Member
 
Registered: Apr 2018
Distribution: Slackware64 14.2 & -Current
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
I haven't tried it myself, but looking at the link below the dependencies look to be some more...

https://aur.archlinux.org/packages/autokey/
After reviewing the dependencies listed there; I notice it says qscintilla-qt5. I am using the QScintilla package provided by the SlackWare64 -current install. I am hypothesizing the issue maybe caused by this library not being built with Qt5 support, as Slackware currently does not include Qt5. However, I do see that there is a conditional Qt5 build part of the SlackBuild in the source directory. I'm not sure though if the code means it always builds Qt5 support, or only if Qt5 is installed at build time.
 
Old 08-08-2019, 10:09 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,357

Rep: Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146
I compiled pyqt5 recently for some crazy thing that I eventually had the sense to leave…
Anyhow in your honour, I had a look in pyqt5, and it had this:

/usr/lib64/python3.7/site-packages/PyQt5/uic/widget-plugins/qscintilla.py

I don't have Qscintilla installed. I would look for that, and if it's there try a few symlinks or see if it's indexed.
 
Old 08-09-2019, 08:15 AM   #6
The_Dark_Passenger
Member
 
Registered: Apr 2018
Distribution: Slackware64 14.2 & -Current
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
I compiled pyqt5 recently for some crazy thing that I eventually had the sense to leave…
Anyhow in your honour, I had a look in pyqt5, and it had this:

/usr/lib64/python3.7/site-packages/PyQt5/uic/widget-plugins/qscintilla.py

I don't have Qscintilla installed. I would look for that, and if it's there try a few symlinks or see if it's indexed.
I've tried taking a look at it. And tried symlinking back to PyQt5, but the issue remains. I'm still very confused as to why I'm unable to get this application to launch. Has anyone else tried autokey and have this issue?
 
Old 08-09-2019, 12:45 PM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,357

Rep: Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146
I'm sorry I mentioned symlinking. Have you got that file in pyqt5?

The symlink would be your qscintilla.py to that exact location in pyqt5 but that doesn't get you past the fact that the modules are probably listed somewhere and the app checks the list.
 
Old 08-09-2019, 01:16 PM   #8
The_Dark_Passenger
Member
 
Registered: Apr 2018
Distribution: Slackware64 14.2 & -Current
Posts: 58

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
I'm sorry I mentioned symlinking. Have you got that file in pyqt5?

The symlink would be your qscintilla.py to that exact location in pyqt5 but that doesn't get you past the fact that the modules are probably listed somewhere and the app checks the list.
Yes, that file exists in the exact location you mentioned.
 
Old 08-10-2019, 05:34 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,357

Rep: Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146
Quote:
Originally Posted by The_Dark_Passenger View Post
Yes, that file exists in the exact location you mentioned.
It would appear not to be the problem. Your error
Code:
File "/usr/lib64/python3.7/site-packages/PyQt5/uic/__init__.py", line 202, in loadUiType
    exec(code_string.getvalue(), ui_globals)
  File "<string>", line 67, in <module>
  File "/home/a2work/Downloads/autokey-master/lib/autokey/qtui/scriptpage.py", line 20, in <module>
    from PyQt5 import Qsci
ImportError: cannot import name 'Qsci' from 'PyQt5' (/usr/lib64/python3.7/site-packages/PyQt5/__init__.py)
That's not qscintilla.py, that's Qsci. I'd grok the code and see exactly what it wants. When it comes to python code, it's in text, so even the uninitiated (like me) can read filenames.
 
Old 08-11-2019, 11:53 AM   #10
The_Dark_Passenger
Member
 
Registered: Apr 2018
Distribution: Slackware64 14.2 & -Current
Posts: 58

Original Poster
Rep: Reputation: Disabled
As it turns out, it appears that as I suspected Qscintilla is not built with Qt5 support that is included with the official Slackware release at the moment. I replaced the default version with AlienBob's build for his latest KTown. This does include the required Qt5 support, and AutoKey now launches.

Great! But, now there appears to be a bug with AutoKey. It has been reported within the past week to the developers https://github.com/autokey/autokey/issues/301. When launching AutoKey, the following happens,
Code:
  1 user@hostname:~/Downloads/autokey-master/lib$ python3 -m autokey.qtui --verbose
  2 /home/user/Downloads/autokey-master/lib/autokey/qtui/common.py:38: UserWarning: Compiled Qt resources file not found. If autokey is launched directly from the source directory, this is expected and harmless. If not, this indicates a failure in the resource compilation.
  3   warnings.warn(warn_msg)
  4 QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-user'
  5 2019-08-11 12:49:29,296 INFO - root - Initialising application
  6 2019-08-11 12:49:29,323 INFO - root - Initialise global hotkeys
  7 2019-08-11 12:49:29,323 INFO - config-manager - Loading config from existing file: /home/user/.config/autokey/autokey.json
  8 2019-08-11 12:49:29,324 DEBUG - config-manager - Loading folder at '/home/user/.config/autokey/data/Sample Scripts'
  9 2019-08-11 12:49:29,325 DEBUG - config-manager - Loading folder at '/home/user/.config/autokey/data/My Phrases'
 10 2019-08-11 12:49:29,326 INFO - config-manager - Configuration changed - rebuilding in-memory structures
 11 2019-08-11 12:49:29,326 DEBUG - inotify - Adding watch for /home/user/.config/autokey/data/Sample Scripts
 12 2019-08-11 12:49:29,326 DEBUG - inotify - Adding watch for /home/user/.config/autokey/data/My Phrases
 13 2019-08-11 12:49:29,326 DEBUG - inotify - Adding watch for /home/user/.config/autokey/data/My Phrases/Addresses
 14 2019-08-11 12:49:29,326 INFO - config-manager - Successfully loaded configuration
 15 2019-08-11 12:49:29,326 DEBUG - inotify - Adding watch for /home/user/.config/autokey/data
 16 2019-08-11 12:49:29,326 DEBUG - inotify - Adding watch for /home/user/.config/autokey
 17 2019-08-11 12:49:29,327 DEBUG - config-manager - Global settings: {'isFirstRun': True, 'serviceRunning': True, 'menuTakesFocus': False, 'showTrayIcon': True, 'sortByUsageCount': True, 'promptToSave': False, 'enableQT4Workaround': False, 'interfaceType': 'XRecord', 'undoUsingBackspace': True, 'windowDefaultSize': [600, 400], 'hPanePosition': 150, 'columnWidths': [150, 50, 100], 'showToolbar': True, 'notificationIcon':     'autokey-status', 'workAroundApps': '.*VirtualBox.*|krdc.Krdc', 'triggerItemByInitial': False, 'scriptGlobals': {}}
 18 2019-08-11 12:49:29,327 INFO - service - Starting service
 19 2019-08-11 12:49:29,362 DEBUG - interface - Modifier masks: {<Key.SHIFT: '<shift>'>: 1, <Key.CAPSLOCK: '<capslock>'>: 2, <Key.CONTROL: '<ctrl>'>: 4, <Key.ALT: '<alt>'>: 8, <Key.ALT_GR: '<alt_gr>'>: 128, <Key.SUPER: '<super>'>: 64, <Key.HYPER: '<hyper>'>: 64, <Key.META: '<meta>'>: 8, <Key.NUMLOCK: '<numlock>'>: 16}
 20 2019-08-11 12:49:29,383 DEBUG - interface - Alt-Grid: XK_Alt_R, 65514
 21 2019-08-11 12:49:29,384 DEBUG - interface - X Server Keymap, listing unmapped keys.
 22 2019-08-11 12:49:29,384 DEBUG - iomediator - Set modifier Key.CAPSLOCK to False
 23 2019-08-11 12:49:29,384 DEBUG - iomediator - Set modifier Key.NUMLOCK to False
 24 2019-08-11 12:49:29,385 DEBUG - interface - Grabbing hotkey: ['<super>'] 'k'
 25 2019-08-11 12:49:29,385 DEBUG - interface - Grabbing hotkey: ['<shift>', '<super>'] 'k'
 26 2019-08-11 12:49:29,385 DEBUG - interface - __flushEvents: Entering event loop.
 27 2019-08-11 12:49:29,385 INFO - iomediator - Created IoMediator instance, current interface is: <XRecordInterface(XInterface-thread, initial daemon)>
 28 2019-08-11 12:49:29,385 DEBUG - interface - Grabbing hotkey: ['<ctrl>'] '<f7>'
 29 X protocol error:
 30 <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 1787, sequence_number = 26, major_opcode = 33, minor_opcode = 0
 31 X protocol error:
 32 <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 1787, sequence_number = 27, major_opcode = 33, minor_opcode = 0
 33 X protocol error:
 34 <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 1787, sequence_number = 28, major_opcode = 33, minor_opcode = 0
 35 X protocol error:
 36 <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 1787, sequence_number = 29, major_opcode = 33, minor_opcode = 0
 37 2019-08-11 12:49:29,394 INFO - interface - XRecord interface thread starting
 38 2019-08-11 12:49:29,395 INFO - service - Service now marked as running
 39 2019-08-11 12:49:29,395 DEBUG - root.Qt-GUI.System-tray-notifier - Creating system tray icon notifier.
 40 2019-08-11 12:49:29,401 INFO - root.Qt-GUI.System-tray-notifier - Creating static context menu actions.
 41 2019-08-11 12:49:29,402 DEBUG - root.Qt-GUI.System-tray-notifier - Show tray icon enabled in settings: True
 42 2019-08-11 12:49:29,402 INFO - root.Qt-GUI.System-tray-notifier - Rebuilding model item actions, adding all items marked for access through the tray icon.
 43 2019-08-11 12:49:29,402 DEBUG - phrase-menu - Sorting phrase menu by usage count
 44 2019-08-11 12:49:29,404 DEBUG - root.Qt-GUI.System-tray-notifier - About to show the tray icon.
 45 2019-08-11 12:49:29,405 INFO - root.Qt-GUI.System-tray-notifier - System tray icon notifier created.
 46 2019-08-11 12:49:29,405 DEBUG - root.Qt-GUI.CentralWidget - CentralWidget instance created.
 47 2019-08-11 12:49:29,437 ERROR - root - Fatal error starting AutoKey: <built-in function connectSlotsByName> returned a result with an error set
 48 AttributeError: __getattribute__
 49 
 50 The above exception was the direct cause of the following exception:
 51 
 52 Traceback (most recent call last):
 53   File "/home/user/Downloads/autokey-master/lib/autokey/qtapp.py", line 132, in __init__
 54     self.configWindow = ConfigWindow(self)
 55   File "/home/user/Downloads/autokey-master/lib/autokey/qtui/configwindow.py", line 44, in __init__
 56     self.setupUi(self)
 57   File "<string>", line 12, in setupUi
 58   File "/home/user/Downloads/autokey-master/lib/autokey/qtui/centralwidget.py", line 40, in __init__
 59     self.setupUi(self)
 60   File "<string>", line 38, in setupUi
 61   File "/home/user/Downloads/autokey-master/lib/autokey/qtui/phrasepage.py", line 34, in __init__
 62     self.setupUi(self)
 63   File "<string>", line 46, in setupUi
 64   File "/home/user/Downloads/autokey-master/lib/autokey/qtui/settingswidget.py", line 40, in __init__
 65     self.hotkey_settings_dialog = HotkeySettingsDialog(self)
 66   File "/home/user/Downloads/autokey-master/lib/autokey/qtui/dialogs/hotkeysettings.py", line 49, in __init__
 67     self.setupUi(self)
 68   File "<string>", line 58, in setupUi
 69 SystemError: <built-in function connectSlotsByName> returned a result with an error set
This looks to possibly be an issue within PyQt5. But, just putting this out there in case anyone has enough knowledge with Python to see what's going wrong, and how to fix it.

Thanks.
 
Old 08-12-2019, 03:43 AM   #11
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,357

Rep: Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146Reputation: 1146
No bug fix, but this is the error that matters
Code:
 68   File "<string>", line 58, in setupUi
 69 SystemError: <built-in function connectSlotsByName> returned a result with an error set
That's a section header in a file, You can at least look yourself without doing harm.

Possibly having something to do with this:
Code:
28 2019-08-11 12:49:29,385 DEBUG - interface - Grabbing hotkey: ['<ctrl>'] '<f7>'
 29 X protocol error:
 30 <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 1787, sequence_number = 26, major_opcode = 33, minor_opcode = 0
 31 X protocol error:
 32 <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 1787, sequence_number = 27, major_opcode = 33, minor_opcode = 0
 33 X protocol error:
 34 <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 1787, sequence_number = 28, major_opcode = 33, minor_opcode = 0
 35 X protocol error:
 36 <class 'Xlib.error.BadAccess'>: code = 10, resource_id = 1787, sequence_number = 29, major_opcode = 33, minor_opcode = 0
 37 2019-08-11 12:49:29,394 INFO - interface - XRecord interface thread starting
It just might be interesting to try Ctrl_f7 while the thing is booting. It might yield something. and XRecord might have noted something.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need auto run in games without an auto run, used to use AutoHotKey in Windows, trying AutoKey, but having problems eric1234 Linux - Games 15 02-01-2019 11:58 AM
LXer: Using Autokey Scripts to Automate Your Linux Desktop LXer Syndicated Linux News 0 05-12-2013 01:11 PM
LXer: Autokey: Make Your Own Keyboard Shortcuts In Linux LXer Syndicated Linux News 0 09-30-2010 02:30 AM
Autokey and current64 charlie_lab Slackware 4 03-20-2010 03:56 PM
LXer: Avoid Typing with Autokey LXer Syndicated Linux News 0 03-27-2009 05:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration