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

Start Yin-Yang from menu,notify a error #305

Open
ppaa135 opened this issue Jun 28, 2024 · 4 comments
Open

Start Yin-Yang from menu,notify a error #305

ppaa135 opened this issue Jun 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ppaa135
Copy link

ppaa135 commented Jun 28, 2024

What happened?

start Yin-Yang from menu,notify a error:
Error while loading application translations!
27017D01562751654CC918609EFDD346

Version

yin-yang 3.4-1

How did you install Yin & Yang?

Git clone + running install script

What desktop environments are you seeing the problem on?

KDE

Which plugin causes the issue?

None

What software version do you use?

No response

Relevant log output

No response

@ppaa135 ppaa135 added the bug Something isn't working label Jun 28, 2024
@simoncarrignon
Copy link

Same here with debian 12 and kde plasma 5.27.

$ yin-yang -t

doesn't do anything
Log when runnning

$ yin-yang
Plugin Icons has no support for your desktop environment yet!
Traceback (most recent call last):
  File "/opt/yin-yang/yin_yang/__main__.py", line 113, in <module>
    raise FileNotFoundError('Error while loading application translations!')
FileNotFoundError: Error while loading application translations!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/yin-yang/yin_yang/__main__.py", line 116, in <module>
    logger.error(str(e))
  File "/usr/lib/python3.11/logging/__init__.py", line 1518, in error
    self._log(ERROR, msg, args, **kwargs)
  File "/usr/lib/python3.11/logging/__init__.py", line 1634, in _log
    self.handle(record)
  File "/usr/lib/python3.11/logging/__init__.py", line 1644, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.11/logging/__init__.py", line 1706, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.11/logging/__init__.py", line 978, in handle
    self.emit(record)
  File "/opt/yin-yang/yin_yang/NotificationHandler.py", line 8, in emit
    subprocess.call(['notify-send', record.levelname, str(record.msg),
  File "/usr/lib/python3.11/subprocess.py", line 389, in call
    with Popen(*popenargs, **kwargs) as p:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1901, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'notify-send'

@simoncarrignon
Copy link

simoncarrignon commented Jul 13, 2024

I think there is two problems: first it doesn't load the translations, which is right, but then it's the logger that fails:

if translator.load(QLocale.system(), 'yin_yang', '.', path):
app.installTranslator(translator)
else:
raise FileNotFoundError('Error while loading application translations!')
except Exception as e:
logger.error(str(e))
print('Error while loading translation. Using default language.')

I am just skipping the line 116 as a quick fix for now!

@ppaa135
Copy link
Author

ppaa135 commented Jul 13, 2024

@simoncarrignon ok,I see and I fix it too with your way,thanks. And you can make yin-yang self-start when PC boot

@ppaa135
Copy link
Author

ppaa135 commented Jul 13, 2024

@simoncarrignon I try to add the service for making it self -start , but it fail
image

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