Skip to content

Conversation

@MHendricks
Copy link
Member

@MHendricks MHendricks commented Jan 21, 2026

  • Use xdg-open to browse files on linux
  • Fix pref_updates.json path to work on linux
  • Fix issue trying to join a PosixPath with None

I can't easily replicate this issue, it seems to be related to prefs migration, but this is the traceback I debugged and the code was able to fix a instance of it.

Traceback (most recent call last):
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/gui/errordialog.py", line 58, in show_logger
    launch()
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/__init__.py", line 175, in launch
    widget = LoggerWindow.instance(
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/gui/loggerwindow.py", line 2306, in instance
    inst = LoggerWindow(
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/gui/loggerwindow.py", line 154, in __init__
    self.restorePrefs()
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/gui/loggerwindow.py", line 1652, in restorePrefs
    self.restoreWorkboxPrefs(pref)
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/gui/loggerwindow.py", line 1624, in restoreWorkboxPrefs
    self.uiWorkboxTAB.restore_prefs(workbox_prefs)
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/gui/group_tab_widget/group_tab_widget.py", line 382, in restore_prefs
    backup_file, _, count = get_backup_version_info(
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/prefs.py", line 262, in get_backup_version_info
    files = get_file_group(core_name, workbox_id)
  File "/usr/local/venv/py39qt5152/20665/python/lib/python3.9/site-packages/preditor/prefs.py", line 209, in get_file_group
    workbox_dir = directory / workbox_id
TypeError: unsupported operand type(s) for /: 'PosixPath' and 'NoneType'
The old preditor_pref.json"
    "workbox_prefs": {
        "groups": [
            {
                "current": true,
                "name": "Group01",
                "tabs": [
                    {
                        "current": true,
                        "filename": null,
                        "name": "Workbox01",
                        "tempfile": "workbox_4pmd088k.py"
                    }
                ]
            }
        ]
    }
The fixed preditor_pref.json" after this fix is applied.
    "workbox_prefs": {
        "groups": [
            {
                "current": true,
                "name": "Group01",
                "tabs": [
                    {
                        "backup_file": "workbox_4pmd088k/workbox_4pmd088k-2026-01-20-17-51-19-616951.py",
                        "current": true,
                        "filename": null,
                        "name": "Workbox01",
                        "tempfile": "workbox_4pmd088k.py",
                        "workbox_id": "workbox_4pmd088k"
                    }
                ]
            }
        ]
    }

Checklist

  • I have read the CONTRIBUTING.md document
  • I formatted my changes with black
  • I linted my changes with flake8
  • I have added documentation regarding my changes where necessary
  • Any pre-existing tests continue to pass
  • Additional tests were made covering my changes

Types of Changes

  • Bugfix (change that fixes an issue)
  • New Feature (change that adds functionality)
  • Documentation Update (if none of the other choices apply)

@MHendricks MHendricks merged commit 1f0466e into main Jan 21, 2026
21 checks passed
@MHendricks MHendricks deleted the mikeh/posix_fixes branch January 21, 2026 01:57
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

Successfully merging this pull request may close these issues.

2 participants