Skip to content

AttributeError: 'NoneType' object has no attribute 'version' in checkAPT.py #1059

@KingOfPlayer

Description

@KingOfPlayer

Describe the bug
The Update Manager is unable to update the version list. The process fails when it encounters a package that is installed but lacks a "candidate" version. In my case, the "snapd" package caused this error, preventing any other updates from being displayed.

Screenshots
Image

To Reproduce
I'm not sure how it happened. At one point I was enabling and deactivating the "snap" package.

Expected behavior
The Update Manager should handle packages without a candidate version gracefully and continue refreshing the rest of the list.

Distribution:

  • Linux Mint
  • LMDE
  • Other (please specify)

Software version:
7.1.1

Logs:

2026.04.30@21:54 ++ Launching Update Manager
2026.04.30@21:54 ++ Initial refresh will happen in 0 day(s), 0 hour(s) and 10 minute(s)
2026.04.30@21:54 ++ Inhibited power management
2026.04.30@21:54 ++ Checking for updates
2026.04.30@21:54 -- Error in checkAPT.py, could not refresh the list of updates
2026.04.30@21:54 ++ Resumed power management

Additional context
There is terminal log

<class 'AttributeError'>
Error in checkAPT: 'NoneType' object has no attribute 'version'
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintUpdate/mintUpdate.py", line 2227, in check_apt_in_external_process
    check.find_changes()
  File "/usr/lib/linuxmint/mintUpdate/checkAPT.py", line 63, in find_changes
    if (pkg.is_installed and pkg.candidate.version != pkg.installed.version):
                             ^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'version'

Adding a null check for the candidate object would solve this

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions