Error while trying to export logins from SQL Server 2000 to SQL Server 2005
After dealing with this error quite a lot I was not able to find a way to make it work, since support for SQL2000 is no longer available I ended up using dbatools (an awesome PowerShell module): github.com/sqlcollaborative/dbatools

dbatools has a function called Export-SqlLogin which does exactly what I needed: script all logins with sid, password, server role, default db, etc.

I highly recommend looking into this PowerShell module.