Extracting a password protected .7z file with 'p7zip' returns an error

Solution 1:

There is a known bug/limitation in p7zip, in which it cannot work with password-protected encrypted files (technically by design as a 'lighter' kind of 7zip), and throws the error you've stated here when it tries to work with them.

The correct approach for encrypted/passwords 7z files is to use p7zip-full instead of p7zip, which should then work as it should.