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

The new version of Nyrna no longer works for me #1

Closed
famellad opened this issue Jun 17, 2020 · 9 comments
Closed

The new version of Nyrna no longer works for me #1

famellad opened this issue Jun 17, 2020 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@famellad
Copy link

What's expected

Pressing the Pause key pauses the foreground app

What happens

Pressing the Pause key freezes Nyrna

Steps to reproduce

  • Open Nyrna
  • Switch to the app one wants to pause
  • Press the Pause key

Workarounds

I'll just keep using the previous version for the time being

System Info:

OS: Endeavour OS
Kernel: Linux-ck-zen 5.7.2
DE: GNOME 3.36.3
Python: 3.8.3
X.org: 1.20.8

The previous one-file script version of Nyrna worked beautifully when assigning the hotkey through GNOME's setting panel, however this new version with PyGUI not only does not work (it does not pause the foreground application), but even manages to freeze itself, which is kinda funny not gonna lie.

Anyway, here's the terminal output up until the point where it dies, if you need more info let me know!
What I did was open Nyrna on one terminal and on a different terminal I opened GLXGears, and tried to pause that.

alphanumeric key g pressed
'g' released
alphanumeric key l pressed
'l' released
alphanumeric key x pressed
'x' released
alphanumeric key g pressed
'g' released
alphanumeric key e pressed
alphanumeric key a pressed
'e' released
alphanumeric key r pressed
'a' released
'r' released
alphanumeric key s pressed
's' released
special key Key.enter pressed
Key.enter released
special key Key.pause pressed
Key.pause released
/usr/lib/python3.8/site-packages/gi/module.py:171: Warning: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed
  g_type = info.get_g_type()
/usr/lib/python3.8/site-packages/gi/module.py:171: Warning: g_once_init_leave: assertion 'result != 0' failed
  g_type = info.get_g_type()
/usr/lib/python3.8/site-packages/gi/module.py:205: Warning: g_type_get_qdata: assertion 'node != NULL' failed
  type_ = g_type.pytype
@Merrit
Copy link
Owner

Merrit commented Jun 17, 2020

Interesting, can you double check you have libwnck3 installed?

Sounds like Endeavour OS is Arch based, so it should be sudo pacman -S libwnck3

@famellad
Copy link
Author

It was already installed, the version in my system is 3.36.0

@Merrit
Copy link
Owner

Merrit commented Jun 18, 2020

I tried running Nyrna under Endeavour OS in a VM and I can't reproduce your issue.

Which version of GNOME are you running under - GNOME / Wayland / GNOME Classic?
Did you see if rebooting the system or checking for updates resolved the issue?
The one part I can't replicate is your kernel, is it possible for you to try another and see if it makes a difference?

@famellad
Copy link
Author

Running GNOME under X11, did a fresh update (which updated pyqt5) to no avail, then booted the regular Linux kernel, with no luck either.
I must say though this is puzzling (and I feel rather stupid for just noticing this file exists), the nyrna.log file says

2020-06-18 00:09:54,155 - DEBUG - There is no paused_app.pkl, getting active window
2020-06-18 00:09:54,155 - DEBUG - wnck not installed

So I double checked and
image

Maybe I'm missing a Python binding or something I could install through PIP?

@Merrit
Copy link
Owner

Merrit commented Jun 18, 2020

Please paste the output of pip3 list

@famellad
Copy link
Author

Package                       Version            
----------------------------- -------------------
aiohttp                       3.6.2              
alabaster                     0.7.12             
anytree                       2.8.0              
appdirs                       1.4.4              
asn1crypto                    1.3.0              
astroid                       2.4.2              
async-timeout                 3.0.1              
attrs                         19.3.0             
AUR                           2018.8.6.19.53.6   
Automat                       20.2.0             
Babel                         2.8.0              
Beaker                        1.11.0             
beautifulsoup4                4.9.1              
breezy                        3.0.2              
Brlapi                        0.7.0              
btrfsutil                     1.2.0              
CacheControl                  0.12.6             
ceph-volume                   1.0.0              
cephfs                        2.0.0              
cephfs-shell                  0.0.1              
certifi                       2020.4.5.1         
cffi                          1.14.0             
chardet                       3.0.4              
chrome-gnome-shell            0.0.0              
click                         7.1.2              
colorama                      0.4.3              
configobj                     5.0.6              
constantly                    15.1.0             
contextlib2                   0.6.0.post1        
coverage                      4.5.4              
cryptography                  2.9.2              
cycler                        0.10.0             
deluge                        2.0.4.dev23        
distlib                       0.3.0              
distro                        1.5.0              
docutils                      0.16               
dulwich                       0.20.3             
et-xmlfile                    1.0.1              
evdev                         1.3.0              
fastimport                    0.9.8              
future                        0.18.2             
GeoIP                         1.3.2              
Glances                       3.1.4.1            
gunicorn                      20.0.4             
html5lib                      1.0.1              
httplib2                      0.18.1             
hyperlink                     19.0.0             
idna                          2.9                
imagesize                     1.2.0              
incremental                   17.5.0             
iniherit                      0.3.9              
injector                      0.18.3             
isc                           2.0                
isort                         4.3.21             
Jade-Application-Kit          2.1.4              
jdcal                         1.4.1              
jedi                          0.17.0             
Jinja2                        2.11.2             
kiwisolver                    1.2.0              
lazy-object-proxy             1.5.0              
lensfun                       0.3.95             
louis                         3.14.0             
lutris                        0.5.6              
lxml                          4.5.1              
Mako                          1.1.3              
mallard-ducktype              1.0.2              
Markdown                      3.1.1              
MarkupSafe                    1.1.1              
matplotlib                    3.2.1              
mccabe                        0.6.1              
MemoizeDB                     2017.3.30.23.38.49 
meson                         0.54.3             
mock                          3.0.5              
msgpack                       1.0.0              
multidict                     4.7.6              
nose                          1.3.7              
numpy                         1.18.2             
openpyxl                      3.0.3              
ordered-set                   3.1.1              
packaging                     20.4               
pandas                        1.0.3              
parso                         0.7.0              
patiencediff                  0.1.0              
pbr                           5.4.5              
peewee                        3.13.3             
pep517                        0.8.2              
Pillow                        6.2.1              
pip                           20.0.2             
ply                           3.11               
pm2ml                         2017.12.31.5.7.19  
Powerpill                     2018.11.4.16.1.3   
progress                      1.5                
protonfixes                   1.0.16             
protontricks                  1.4.2.dev2+g351474c
psutil                        5.7.0              
pwquality                     1.4.2              
py3nvml                       0.2.5              
pyalpm                        0.9.1              
pyasn1                        0.4.8              
pyasn1-modules                0.2.8              
pycairo                       1.19.1             
pycodestyle                   2.6.0              
pycparser                     2.20               
pycurl                        7.43.0.5           
pyfavicon                     0.1.1              
pyflakes                      2.2.0              
Pygments                      2.6.1              
PyGObject                     3.36.1             
PyHamcrest                    1.9.0              
pylint                        2.5.3              
pynput                        1.6.8              
pyOpenSSL                     19.1.0             
pyotp                         2.3.0              
pyparsing                     2.4.7              
PyQt5                         5.15.0             
PyQt5-sip                     12.8.0             
PySide2                       5.15.0             
PySimpleGUI                   4.20.0             
PySimpleGUIQt                 0.35.0             
python-dateutil               2.8.1              
python-libtorrent             1.2.7              
python-xlib                   0.27               
pytoml                        0.1.21             
pytz                          2020.1             
pyudev                        0.22.0.dev20200219 
pyxdg                         0.26               
PyYAML                        5.3.1              
pyzbar                        0.1.8              
rados                         2.0.0              
rbd                           2.0.0              
Reflector                     2020.3.21.11.40.36 
rencode                       1.0.6              
requests                      2.23.0             
retrying                      1.3.3              
rgw                           2.0.0              
Rx                            3.1.0              
s-tui                         1.0.0b3            
selinux                       3.0                
service-identity              18.1.0             
setproctitle                  1.1.10             
setuptools                    47.3.1             
setuptools-scm                4.1.2              
shiboken2                     5.15.0             
simplejson                    3.17.0             
six                           1.15.0             
snowballstemmer               2.0.0              
soupsieve                     1.9.5              
Sphinx                        3.1.1              
sphinx-rtd-theme              0.5.0              
sphinxcontrib-applehelp       1.0.2              
sphinxcontrib-devhelp         1.0.2              
sphinxcontrib-htmlhelp        1.0.3              
sphinxcontrib-jsmath          1.0.1              
sphinxcontrib-qthelp          1.0.3              
sphinxcontrib-serializinghtml 1.1.4              
team                          1.0                
text-unidecode                1.3                
ThreadedServers               2019.7.4.22.39.1   
toml                          0.10.1             
tqdm                          4.45.0             
Twisted                       20.3.0             
typing-extensions             3.7.4.1            
urllib3                       1.25.8             
urwid                         2.1.0              
variety                       0.8.3              
vdf                           3.3                
webencodings                  0.5.1              
wheel                         0.34.2             
wrapt                         1.12.1             
XCGF                          2017.3.10.23.45.54 
XCPF                          2019.11.18.23.47.4 
xlrd                          1.2.0              
yarl                          1.4.2              
youtube-dl                    2020.6.16.1        
yoyo-migrations               6.1.0              
zope.interface                5.1.0

@Merrit Merrit added the bug Something isn't working label Jun 18, 2020
@Merrit
Copy link
Owner

Merrit commented Jun 18, 2020

I switched the logic over to using xdotool rather than PyGObject or wnck , which should cut down on code complexity, reduce dependencies, and hopefully be more reliable.

Please check if you have xdotool installed with sudo pacman -S xdotool, and then try the new version of Nyrna.

@Merrit Merrit self-assigned this Jun 18, 2020
@famellad
Copy link
Author

It works PERFECTLY, thank you so much!

@Merrit
Copy link
Owner

Merrit commented Jun 18, 2020

Thank you for the excellent bug report and assistance with troubleshooting! Glad you've found my program useful 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants