Linux Mint Upgrade tool not working (FileNotFoundError)

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
GenesisGreen
Level 1
Level 1
Posts: 4
Joined: Wed May 04, 2022 7:48 pm

Linux Mint Upgrade tool not working (FileNotFoundError)

Post by GenesisGreen »

When I try using the Mint Upgrade tool on Linux Mint 20.3, the tool does no go past the "Upgrade to Linux Mint 21 'Vanessa'" screen.
The terminal gives me this:

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
  
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
The last line gives an error that a file was not found, so I assume I need that file in order to update, however I do not know how to obtain it.
Last edited by LockBot on Tue Feb 07, 2023 11:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Cosmo.
Level 24
Level 24
Posts: 22968
Joined: Sat Dec 06, 2014 7:34 am

Re: Linux Mint Upgrade tool not working

Post by Cosmo. »

Until now there does not yet an announcement for this tool and following that no instructions. You are too early. What you can do is a timeshift restore.
smudos
Level 1
Level 1
Posts: 3
Joined: Mon Aug 08, 2022 11:00 am

Re: Linux Mint Upgrade tool not working

Post by smudos »

The same is with me. As soon as I click on "let's go" button this happens:

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
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/_usr_lib_linuxmint_mintupgrade_mintupgrade.py.0.crash'

Original exception was:
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintupgrade/mintupgrade.py", line 194, in letsgo
    skip = apt_points_to_destination()
  File "/usr/lib/linuxmint/mintupgrade/apt_utils.py", line 78, in apt_points_to_destination
    sources = aptsources.sourceslist.SourcesList()
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 273, in __init__
    self.matcher = SourceEntryMatcher(matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/sourceslist.py", line 470, in __init__
    dist = DistInfo(base_dir=matcherPath)
  File "/usr/lib/python3/dist-packages/aptsources/distinfo.py", line 184, in __init__
    with open(dist_fname) as dist_file:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'
^CTraceback (most recent call last):
  File "/usr/bin/mintupgrade", line 36, in <module>
    b = sub.stdout.read(32)
And, for the record, /usr/share/python-apt/templates/Linuxmint.info file exists.

Maybe the probem lies in double backslah in the address:

/usr/share/python-apt/templates//Linuxmint.info

cheers
User avatar
xenopeek
Level 25
Level 25
Posts: 29611
Joined: Wed Jul 06, 2011 3:58 am

Re: Linux Mint Upgrade tool not working

Post by xenopeek »

smudos wrote: Mon Aug 08, 2022 11:11 am And, for the record, /usr/share/python-apt/templates/Linuxmint.info file exists.
Can you double check that? The error is:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/python-apt/templates//Linuxmint.info'

That file does not exist here. There is a LinuxMint.info file in that directory but not a Linuxmint.info for me (but I'm on a Mint 21 install). Filenames are case sensitive.

And successive forward slashes in paths are ignored. That's not what the problem is here.
Image
smudos
Level 1
Level 1
Posts: 3
Joined: Mon Aug 08, 2022 11:00 am

Re: Linux Mint Upgrade tool not working

Post by smudos »

yep, it's

/usr/share/python-apt/templates/LinuxMint.info

with capital M.

Should I try renaming it? There is also /usr/share/python-apt/templates/LinuxMint.mirrors Should that be renamed too?
User avatar
xenopeek
Level 25
Level 25
Posts: 29611
Joined: Wed Jul 06, 2011 3:58 am

Re: Linux Mint Upgrade tool not working

Post by xenopeek »

We don't understand why we didn't run into this error in testing, or why other users aren't running in to it, but maybe renaming the file for your situation is needed. BTW do you have Update Manager installed or did you maybe remove that?

But first double-check please. Open a terminal and run the command:
lsb_release -a
For the Distribution ID does that say "Linuxmint" or "LinuxMint"?

If it says "Linuxmint" then yes renaming the file may let you proceed with the upgrade. We're not sure yet but if you're willing to try, we would appreciate that and your feedback! Don't rename the .mirrors file; it is referenced from the .info file and is good. To rename the file run:
sudo mv -v /usr/share/python-apt/templates/LinuxMint.info /usr/share/python-apt/templates/Linuxmint.info
Image
mtwebster
Level 1
Level 1
Posts: 43
Joined: Sun Jun 17, 2012 1:29 pm

Re: Linux Mint Upgrade tool not working (FileNotFoundError)

Post by mtwebster »

Also, can you list the files in that folder with

Code: Select all

ls -la /usr/share/python-apt/templates
Thanks
smudos
Level 1
Level 1
Posts: 3
Joined: Mon Aug 08, 2022 11:00 am

Re: Linux Mint Upgrade tool not working (FileNotFoundError)

Post by smudos »

I changed file name and it all worked as it should -> system successfully upgraded :)

Before successfull upgrade lsb_release -a gave

Code: Select all

No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 20.3
Release:	20.3
Codename:	una
After upgrade its:

Code: Select all

No LSB modules are available.
Distributor ID:	Linuxmint
Description:	Linux Mint 21
Release:	21
Codename:	vanessa
And now, after upgrade, /usr/share/python-apt/templates lists both files: LinuxMint.info and Linuxmint.info. Is that OK? Should one of be removed or renamed and if so which one?
User avatar
Mumrik93
Level 1
Level 1
Posts: 45
Joined: Tue Dec 04, 2018 12:07 pm
Location: Sweden

Re: Linux Mint Upgrade tool not working

Post by Mumrik93 »

xenopeek wrote: Mon Aug 08, 2022 12:23 pm We don't understand why we didn't run into this error in testing, or why other users aren't running in to it, but maybe renaming the file for your situation is needed. BTW do you have Update Manager installed or did you maybe remove that?

But first double-check please. Open a terminal and run the command:
lsb_release -a
For the Distribution ID does that say "Linuxmint" or "LinuxMint"?

If it says "Linuxmint" then yes renaming the file may let you proceed with the upgrade. We're not sure yet but if you're willing to try, we would appreciate that and your feedback! Don't rename the .mirrors file; it is referenced from the .info file and is good. To rename the file run:
sudo mv -v /usr/share/python-apt/templates/LinuxMint.info /usr/share/python-apt/templates/Linuxmint.info
I have this same exact problem. I'll run the same correction here and see if it solves the problem and then give feedback if it worked or not.
Image
User avatar
xenopeek
Level 25
Level 25
Posts: 29611
Joined: Wed Jul 06, 2011 3:58 am

Re: Linux Mint Upgrade tool not working (FileNotFoundError)

Post by xenopeek »

Please anybody with the issue, before you make changes also run:
ls -la /usr/share/python-apt/templates

And share the output here. The developer above asked for it, to help with figuring out the cause.
Image
User avatar
Mumrik93
Level 1
Level 1
Posts: 45
Joined: Tue Dec 04, 2018 12:07 pm
Location: Sweden

Re: Linux Mint Upgrade tool not working (FileNotFoundError)

Post by Mumrik93 »

xenopeek wrote: Tue Aug 09, 2022 11:46 am Please anybody with the issue, before you make changes also run:
ls -la /usr/share/python-apt/templates

And share the output here. The developer above asked for it, to help with figuring out the cause.
Sorry, saw this too late. But the changes did work for me, so thanks a lot any how :)
Image
Locked

Return to “Installation & Boot”