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

Unstable on Ubuntu 18.04 #251

Closed
peter-jerry-ye opened this issue Apr 29, 2018 · 16 comments
Closed

Unstable on Ubuntu 18.04 #251

peter-jerry-ye opened this issue Apr 29, 2018 · 16 comments

Comments

@peter-jerry-ye
Copy link

Hi,
I recently updated my OS from Ubuntu 17.10 to 18.04. But I found that the safeeyes isn't stable.
Sometimes it keeps getting to the status of "Disabled until restart", and then it will restart itself. It is repeating this procedure while I'm typing here. Apparently this hasn't affected it's function, but watching it switching on and off is quite annoying.

Is there any information I should provide you?

And I've got another question. Is it possible to remove the tray icon since it's unnecessary? 'Cause with the plugin of Ubuntu on, it will be displayed even if it's necessary. Is it possible to make it a choice like the Variety by Peter Levi has done?
Thanks.

@slgobinath
Copy link
Owner

Hi,

safeeyes isn't stable

Could you please try disabling Smart Pause plugin and see what happens. If it is stable, please execute xprintidle in terminal few times check whether it prints the correct idle time. If executed manually, it should be less than 10.

Is it possible to remove the tray icon since it's unnecessary?

Of course, you can. Just disable the Tray Icon plugin and restart Safe Eyes. You may find the command line parameters useful. Try safeeyes --help from the terminal to check the available options.

@peter-jerry-ye
Copy link
Author

Hi, sorry for not replying.
Well, I tried out xprintidle without disabling Smart Pause and it returns a number steadily growing, greater than 20000. Same after disabled the Smart Pause. Is that which should be less than 10 ?
And it's kind of difficult to see whether it's stable since I've disabled all the tray on my desktop.

@slgobinath
Copy link
Owner

slgobinath commented May 17, 2018

Hi,
If it is steadily growing, xprintidle has some problems because it is supposed to return the idle time of your computer. Once you have moved your mouse or press your key it should start from 0. I expect it less than 10 because the output should be the idle time after you hit the enter key in the terminal.
Could you please try this way?

  1. Disable Smart Pause (which you have already done)
  2. Quit running safe eyes instance
safeeyes -q
  1. Start Safe Eyes from the terminal in debug mode
safeeyes --debug

It will print log messages in the terminal and ~/safeeyes.log
4. Use your computer as usual. You should get the break after 15 minutes (or whatever your break time is)

If you want, while it is running, you can try safeeyes --status to check the status.

@peter-jerry-ye
Copy link
Author

Well in fact, the safeeyes works without any problem. I do get my breaks. However, it was the icon on the tray that keeps indicating that the safeeyes is shut down and restarted. With that said, the every time it changed status, the time expected for the break hasn't changed.
And I tried the xprintidle again, and it worked as it should when I move my mouse around.

@slgobinath
Copy link
Owner

Hi,

keeps indicating that the safeeyes is shut down and restarted

It is the expected behavior. If Safe Eyes is paused, the icon will turn grey.

the every time it changed status, the time expected for the break hasn't changed

You mean the time next to the tray icon?

@peter-jerry-ye
Copy link
Author

Yes.
Well, in fact, since I've closed the tray icon, which stopped it annoying me, and the safeeyes works well, perhaps we can close this issue. Apparently no one else has been affected.

@slgobinath
Copy link
Owner

The time not updated problem has been already reported here at #211 so I close this issue.

@TheCrowned
Copy link

Reopen just to say that I have similar issues. I ran safeeyes --debug and this is my output:

stefano@Lemur:~$ safeeyes --debug
2018-05-24 08:28:21,285 [INFO]:[MainThread] Starting Safe Eyes
2018-05-24 08:28:21,336 [INFO]:[MainThread] Initialize the break screen
2018-05-24 08:28:21,336 [INFO]:[MainThread] Load all the plugins
2018-05-24 08:28:21,336 [INFO]:[MainThread] Initialize the core
2018-05-24 08:28:21,338 [INFO]:[MainThread] Successfully loaded <module 'trayicon.plugin' from '/usr/lib/python3/dist-packages/safeeyes/plugins/trayicon/plugin.py'>
2018-05-24 08:28:21,340 [INFO]:[MainThread] Successfully loaded <module 'notification.plugin' from '/usr/lib/python3/dist-packages/safeeyes/plugins/notification/plugin.py'>
2018-05-24 08:28:21,341 [INFO]:[MainThread] Successfully loaded <module 'healthstats.plugin' from '/usr/lib/python3/dist-packages/safeeyes/plugins/healthstats/plugin.py'>
2018-05-24 08:28:21,342 [INFO]:[MainThread] Successfully loaded <module 'audiblealert.plugin' from '/usr/lib/python3/dist-packages/safeeyes/plugins/audiblealert/plugin.py'>
2018-05-24 08:28:21,343 [INFO]:[MainThread] Successfully loaded <module 'screensaver.plugin' from '/usr/lib/python3/dist-packages/safeeyes/plugins/screensaver/plugin.py'>
2018-05-24 08:28:21,345 [INFO]:[MainThread] Successfully loaded <module 'donotdisturb.plugin' from '/usr/lib/python3/dist-packages/safeeyes/plugins/donotdisturb/plugin.py'>
2018-05-24 08:28:21,345 [DEBUG]:[MainThread] Initialize Tray Icon plugin
Traceback (most recent call last):
File "/usr/bin/safeeyes", line 11, in
load_entry_point('safeeyes==2.0.0', 'console_scripts', 'safeeyes')()
File "/usr/lib/python3/dist-packages/safeeyes/main.py", line 132, in main
safeeyes = SafeEyes(system_locale, config)
File "/usr/lib/python3/dist-packages/safeeyes/SafeEyes.py", line 87, in init
self.plugins_manager.init(self.context, self.config)
File "/usr/lib/python3/dist-packages/safeeyes/PluginManager.py", line 92, in init
plugin['module'].init(context, config, plugin['config'])
File "/usr/lib/python3/dist-packages/safeeyes/plugins/trayicon/plugin.py", line 369, in init
tray_icon = TrayIcon(context, plugin_config)
File "/usr/lib/python3/dist-packages/safeeyes/plugins/trayicon/plugin.py", line 138, in init
self.set_labels()
File "/usr/lib/python3/dist-packages/safeeyes/plugins/trayicon/plugin.py", line 169, in set_labels
entry[0].set_label(self.context['locale'].ngettext(entry[1][0], entry[1][1], entry[2]) % entry[2])
TypeError: not all arguments converted during string formatting

@slgobinath
Copy link
Owner

Hi,
May I know your locale (Execute locale in terminal)?

@TheCrowned
Copy link

Here you are :)

LANG=it_IT.UTF-8
LANGUAGE=
LC_CTYPE="it_IT.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="it_IT.UTF-8"
LC_COLLATE="it_IT.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_MESSAGES="it_IT.UTF-8"
LC_PAPER="it_IT.UTF-8"
LC_NAME="it_IT.UTF-8"
LC_ADDRESS="it_IT.UTF-8"
LC_TELEPHONE="it_IT.UTF-8"
LC_MEASUREMENT="it_IT.UTF-8"
LC_IDENTIFICATION="it_IT.UTF-8"
LC_ALL=

@TheCrowned
Copy link

TheCrowned commented May 27, 2018

Any news on this? This makes Safe Eyes not working at all for me :(
This is an issue not only with the version 2.0.0 taken from the PPA, but with latest 2.0.5 as well.

@slgobinath
Copy link
Owner

Hi,
Sorry, I forgot to reply you. There is nothing wrong with locale files. May I know your Python version (python3 -V) and the content of ~/.config/safeeyes/safeeyes.json.

@TheCrowned
Copy link

TheCrowned commented May 27, 2018

Sure! Thanks for taking care of this!

Python 3.6.5

safeyes.json attached :)
safeeyes.zip

@slgobinath
Copy link
Owner

slgobinath commented May 27, 2018

I think I found the issue.
This bug was in Safe Eyes 2.0.0 and fixed in later versions. I recommend to use the latest version but before that uninstall Safe Eyes 2.0.0.

Please try this solution and let me know.

  1. Uninstall Safe Eyes
  2. Remove config/safeeyes directory: rm -rf ~/.config/safeeyes
  3. Remove safeeyes from bin if exists: rm -f /usr/bin/safeeyes
  4. Remove any temporary files left in Python directory: rm -rf /usr/lib/python3/dist-packages/safeeyes
  5. Install Safe Eyes 2.0.5

@TheCrowned
Copy link

Cool, this solved the issue for me, thanks a lot man! Really appreciate your help! I'm back to not having wrists/arms aching at the of the day :)

@slgobinath
Copy link
Owner

It's my pleasure.
Have a great day :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants