I need help recovering a failed password protected file

I tried to password protect a .txt file and it would not allow so I changed it to an .odt file it allow so I set a password. I don’t see the .odt file and when I try to open the .txt file it gives me a General Error Read/Write error. I can open the .txt file in notebook but it is scrambled. Is there any way to recover this file?

Do you know the password? So you have to find the file in your file system. See File > Recent Documents. If the file isn’t registered there, how should I help?
Do you have access to the file but don’t know the password? See this thread.

If your file was encrypted by LO, you have no chance to recover the password.

See this archived question. @Lupp’s link is supposed to refer to it in the AskLO site but someone deleted the question. Only the web archive has a trace of it. See here.

Only guesswork: You may have loaded/converted to an odt-file but saved the result in the previous .txt
.
To find out you could copy the file and rename this copy to test.zip If you can open this .zip-File and see contents my idea may be right. Close and rename to test.odt and try to open with LibreOffice. If you are asked for a password Ivhope you remember…
.
But the “general error” is not promising much…