Quick Tutorial: Fixing Audacity 2.x projects not opening in Audacity 3

I recently decided to upgrade my installation of the Audacity audio editor software on my desktop from version 2.1.1 to version 3.0.0 (the original version I had installed dated back to 2015!), and noticed that one of the project files I had saved in the previous version failed to import, throwing an error almost immediately:

Import Project:
Couldn’t import the project:
Could not load file “<file pathname>.aup”

Import Project: Couldn't import the project: Could not load file ".aup"

Audacity 3 failing to open an Audacity 2 project

Further investigation by viewing the error log (go to Help > Diagnostics > Show Log…) revealed the reason the project file was having issues. At the bottom of the log, it revealed that the .aup file (really an XML file with a different extension) had an invalid “sel0” attribute, causing the import to fail:

File name is <file pathname>.aup
17:42:52: Mime type is *
17:42:52: Opening with legacyaup
17:42:52: Open(<file pathname>.aup) succeeded
17:42:52: Error: Invalid project ‘sel0’ attribute.
17:42:52: Error: Internal error in importer…tag not recognized

Editing the .aup file directly in Notepad++ revealed why the tag was causing the importer to fail; its value (a start-of-selection marker) was set to a slightly negative value, confusing the importer.

<project […] audacityversion=”2.1.1″ sel0=”-0.0511337900″ sel1=”310.1538548753″ […]>

Changing the value manually to sel0=”0.0000000000″ and saving the file was enough to fix the project file, and Audacity was able to open the project without issue.