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

Won't start after installation due to float and string comparisons #230

Open
tjohnman opened this issue Nov 7, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@tjohnman
Copy link

tjohnman commented Nov 7, 2023

Describe the bug

Yin-Yang does not start.

Affected versions

  • Yin-Yang version:
    I tried building master and beta from source. I also tried the 3.2.4 release package.

Additional notes

These are the errors that the script encounters on launch:

Plugin Icons has no support for your desktop environment yet!
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/opt/yin-yang/yin_yang/__main__.py", line 16, in <module>
    from yin_yang import daemon_handler
  File "/opt/yin-yang/yin_yang/daemon_handler.py", line 7, in <module>
    from .config import ConfigWatcher, config
  File "/opt/yin-yang/yin_yang/config.py", line 492, in <module>
    config = ConfigManager()
  File "/opt/yin-yang/yin_yang/config.py", line 192, in __init__
    self.load()
  File "/opt/yin-yang/yin_yang/config.py", line 255, in load
    if config_loaded['version'] < self.defaults['version']:
TypeError: '<' not supported between instances of 'str' and 'float'
Traceback (most recent call last):
  File "/opt/yin-yang/main.py", line 13, in <module>
    from src import daemon_handler
  File "/opt/yin-yang/src/daemon_handler.py", line 7, in <module>
    from src.config import ConfigWatcher, config
  File "/opt/yin-yang/src/config.py", line 474, in <module>
    config = ConfigManager()
  File "/opt/yin-yang/src/config.py", line 179, in __init__
    self.load()
  File "/opt/yin-yang/src/config.py", line 243, in load
    config_loaded = update_config(config_loaded, self.defaults)
  File "/opt/yin-yang/src/config.py", line 42, in update_config
    if config_old['version'] <= 2.1:
TypeError: '<=' not supported between instances of 'str' and 'float'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 153, in apport_excepthook
    with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: '/var/crash/_opt_yin-yang_main.py.1000.crash'

Original exception was:
Traceback (most recent call last):
  File "/opt/yin-yang/main.py", line 13, in <module>
    from src import daemon_handler
  File "/opt/yin-yang/src/daemon_handler.py", line 7, in <module>
    from src.config import ConfigWatcher, config
  File "/opt/yin-yang/src/config.py", line 474, in <module>
    config = ConfigManager()
  File "/opt/yin-yang/src/config.py", line 179, in __init__
    self.load()
  File "/opt/yin-yang/src/config.py", line 243, in load
    config_loaded = update_config(config_loaded, self.defaults)
  File "/opt/yin-yang/src/config.py", line 42, in update_config
    if config_old['version'] <= 2.1:
TypeError: '<=' not supported between instances of 'str' and 'float'

Casting the version numbers to float solves this problem. But it might not be the proper way to fix it.

@tjohnman tjohnman added the bug Something isn't working label Nov 7, 2023
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

1 participant