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

get_current_location(): TypeError: expected str, bytes or os.PathLike object, not TypeError #287

Open
mirsella opened this issue Apr 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mirsella
Copy link

What happened?

hello !

i'm on latest archlinux testing with kde, wayland, and yin yang was working before.
Linux main 6.8.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 05 Apr 2024 00:14:23 +0000 x86_64 GNU/Linux
Python 3.11.8

thanks !

Version

the UI says 3.3 (like it is in config.py) and the AUR package says 3.4.1

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

// when checking the the 'update location automatically' i get thoses logs:
Plugin Icons has no support for your desktop environment yet!
Error while loading translation. Using default language.
Traceback (most recent call last):
  File "/opt/yin-yang/yin_yang/config.py", line 403, in location
    coordinate = get_current_location()
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/yin-yang/yin_yang/position.py", line 22, in get_current_location
    raise TypeError('Unable to get current location')
TypeError: Unable to get current location

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/yin-yang/yin_yang/ui/main_window_connector.py", line 229, in update_location
    self.load_location()
  File "/opt/yin-yang/yin_yang/ui/main_window_connector.py", line 107, in load_location
    coordinates = config.location
                  ^^^^^^^^^^^^^^^
  File "/opt/yin-yang/yin_yang/config.py", line 407, in location
    logger.error(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, 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 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1883, in _execute_child
    self.pid = _fork_exec(
               ^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not TypeError

// the UI still work but when clicking 'apply' it doesn't work and i get this log when trying to launch the app again:
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 146, in <module>
    window = main_window_connector.MainWindow()
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/yin-yang/yin_yang/ui/main_window_connector.py", line 55, in __init__
    self.load()
  File "/opt/yin-yang/yin_yang/ui/main_window_connector.py", line 89, in load
    self.load_location()
  File "/opt/yin-yang/yin_yang/ui/main_window_connector.py", line 107, in load_location
    coordinates = config.location
                  ^^^^^^^^^^^^^^^
  File "/opt/yin-yang/yin_yang/config.py", line 407, in location
    logger.error(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, 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 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1883, in _execute_child
    self.pid = _fork_exec(
@mirsella mirsella added the bug Something isn't working label Apr 10, 2024
@l0drex
Copy link
Collaborator

l0drex commented Apr 10, 2024

Might be fixed once #285 is merged

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