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

State file missing and subsequent key errors #1995

Open
samuelallister opened this issue Jan 6, 2025 · 2 comments · May be fixed by #1996
Open

State file missing and subsequent key errors #1995

samuelallister opened this issue Jan 6, 2025 · 2 comments · May be fixed by #1996

Comments

@samuelallister
Copy link
Contributor

Hello,

Installation source:
I added [email protected]:bit-team/backintime.git as upstream remote and pulled the latest changes with git pull upstream dev

Issue:
When I run ./backintime-qt i get the following errors:

Traceback (most recent call last):
[lines removed]
  File "/home/samoore/.pyenv/versions/3.12.6/lib/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/samoore/.local/state/backintime.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
[lines removed]
  File "/home/samoore/bit/common/statedata.py", line 70, in last_path
    self._state['gui']['mainwindow'][
KeyError: 'last_path'

I then run touch .local/state/backintime.json and the program now runs but when I exit i get:

Traceback (most recent call last):
  File "/home/samoore/bit/qt/app.py", line 885, in closeEvent
    profile_state.last_path = pathlib.Path(self.path)
    ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/samoore/bit/common/statedata.py", line 70, in last_path
    self._state['gui']['mainwindow'][
KeyError: 'last_path'
Aborted (core dumped)

It may be worth noting that I had to edit /common/backintim and /qt/backintime-qt to point to my ven as they were originally pointing to /usr/bin/python3. Perhaps there's some issue with my setup?

Diagnostics:

{
    "backintime": {
        "name": "Back In Time",
        "version": "1.6.0-dev.a5c44451",
        "running-as-root": false,
        "latest-config-version": 6,
        "local-config-file": "/home/UsernameReplaced/.config/backintime/config",
        "local-config-file-found": true,
        "global-config-file": "/etc/backintime/config",
        "global-config-file-found": false,
        "started-from": "/home/UsernameReplaced/bit/common",
        "user-callback": "/home/UsernameReplaced/.config/backintime/user-callback",
        "keyring-supported": false,
        "git-project-root": "/home/UsernameReplaced/bit",
        "git-branch": "dev",
        "git-hash": "f3eb75cdaf5be6a93e2c16abc6b1516794efa5bb"
    },
    "host-setup": {
        "OS": {
            "/etc/os-release": "Ubuntu 22.04.5 LTS",
            "/etc/lsb-release": "DISTRIB_ID=Ubuntu\nDISTRIB_RELEASE=22.04\nDISTRIB_CODENAME=jammy\nDISTRIB_DESCRIPTION=\"Ubuntu 22.04.5 LTS\"\n",
            "/etc/debian_version": "bookworm/sid\n"
        },
        "platform": "Linux-5.15.167.4-microsoft-standard-WSL2-x86_64-with-glibc2.35",
        "system": "Linux #1 SMP Tue Nov 5 00:21:55 UTC 2024",
        "display-system": "($XDG_SESSION_TYPE not set)",
        "locale": "en_GB, UTF-8",
        "PATH": "/home/UsernameReplaced/venv/bin:/home/UsernameReplaced/.local/bin:/usr/lib/qt6/bin:/home/UsernameReplaced/.pyenv/plugins/pyenv-virtualenv/shims:/home/UsernameReplaced/.pyenv/shims:/home/UsernameReplaced/.pyenv/bin:/home/UsernameReplaced/.pyenv/plugins/pyenv-virtualenv/shims:/home/UsernameReplaced/.pyenv/bin:/home/UsernameReplaced/.nvm/versions/node/v23.0.0/bin:/run/user/1000/fnm_multishells/871_1736127491990/bin:/home/UsernameReplaced/.local/share/fnm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Users/samue/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/samue/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin",
        "RSYNC_OLD_ARGS": "(not set)",
        "RSYNC_PROTECT_ARGS": "(not set)"
    },
    "python-setup": {
        "python": "3.12.6 main Oct  2 2024 13:50:02 CPython GCC 11.4.0",
        "python-executable": "/home/UsernameReplaced/venv/bin/python",
        "python-executable-symlink": true,
        "python-executable-resolved": "/home/UsernameReplaced/.pyenv/versions/3.12.6/bin/python3.12",
        "sys.path": [
            "/home/UsernameReplaced/bit/qt/plugins",
            "/home/UsernameReplaced/bit/common/plugins",
            "/home/UsernameReplaced/bit/plugins",
            "/home/UsernameReplaced/bit/common",
            "/home/UsernameReplaced/.pyenv/versions/3.12.6/lib/python312.zip",
            "/home/UsernameReplaced/.pyenv/versions/3.12.6/lib/python3.12",
            "/home/UsernameReplaced/.pyenv/versions/3.12.6/lib/python3.12/lib-dynload",
            "/home/UsernameReplaced/venv/lib/python3.12/site-packages"
        ],
        "qt": {
            "Version": "PyQt 6.4.2 / Qt 6.4.2",
            "Theme": "hicolor",
            "Theme Search Paths": [
                "/home/UsernameReplaced/.local/share/icons",
                "/usr/share/icons",
                "/var/lib/snapd/desktop/icons",
                ":/icons"
            ],
            "Fallback Theme": "hicolor",
            "Fallback Search Paths": [
                "/usr/share/pixmaps"
            ]
        }
    },
    "external-programs": {
        "rsync": {
            "version": "3.2.7",
            "protocol": "31.0",
            "capabilities": "file_bits: 64; inum_bits: 64; timestamp_bits: 64; long_int_bits: 64; socketpairs: True; symlinks: True; symtimes: True; hardlinks: True; hardlink_specials: True; hardlink_symlinks: True; IPv6: True; atimes: True; batchfiles: True; inplace: True; append: True; ACLs: True; xattrs: True; secluded_args: optional; iconv: True; prealloc: True; stop_at: True; crtimes: False",
            "optimizations": "SIMD_roll: True; asm_roll: False; openssl_crypto: True; asm_MD5: False",
            "checksum_list": "xxh128, xxh3, xxh64, md5, md4, sha1, none",
            "compress_list": "zstd, lz4, zlibx, zlib, none",
            "daemon_auth_list": "sha512, sha256, sha1, md5, md4"
        },
        "ssh": "OpenSSH_8.9p1 Ubuntu-3ubuntu0.10, OpenSSL 3.0.2 15 Mar 2022",
        "sshfs": "(no sshfs)",
        "encfs": "(no encfs)",
        "shell": "/bin/bash",
        "shell-version": "GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)"
    }
}
@fallingrock
Copy link
Contributor

I'm seeing the same thing.

@buhtz
Copy link
Member

buhtz commented Jan 6, 2025

That's a bit embarrassing. 😶‍🌫️
I know the cause and work on a fix and further testing.

@buhtz buhtz added the Bug label Jan 6, 2025
@buhtz buhtz added this to the 1.6.0 (upcoming release) milestone Jan 6, 2025
@buhtz buhtz linked a pull request Jan 7, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants