-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Running yin_yang --systemd throws a TypeError: 'module' object is not callable error.
Apparently this is because the --systemd code path does not call sys.exit(), which means the module finishes loading and pip's wrapper attempts to call __main__(), which is a module and thus not callable.
For reference, this is the wrapper executable generated by pip on my system.
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from yin_yang import __main__
if __name__ == "__main__":
sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])
sys.exit(__main__())yin_yang.__main__ is not callable since it is a module, not a function.
This also affects the -t switch.
Line 88 in d6b9c4f
| theme_switcher.set_mode(not config.dark_mode) |
Line 91 in d6b9c4f
| theme_switcher.set_desired_theme() |
Does not happen on the main (GUI) code path because it calls sys.exit():
Line 159 in d6b9c4f
| sys.exit(app.exec()) |
Version
master d6b9c4f
How did you install Yin & Yang?
AUR
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
Traceback (most recent call last):
File "/usr/bin/yin_yang", line 8, in <module>
sys.exit(__main__())
~~~~~~~~^^
TypeError: 'module' object is not callableReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working