Home > Software design >  I did it by the tutorial and it's not working
I did it by the tutorial and it's not working

Time:11-26

I found some projects on youtube, and this is one of them. I'm trying with the password manager program. Here's the link: enter image description here

The guy even has his version of the code on github. I copy-pasted it and still doesn't work

On the video, does the key.key file generate itself, or not?

CodePudding user response:

The only possible code that could write to the key.key file is both:

  • commented out; and
  • not called even if it were not commented out,

So, no, it's not correct to say that "the key.key file generate[s] itself".


Looking over the linked video, the presenter at some point (at 1:29:50, more precisely) had the code call that function to create the file, then removed that call and commented out that function.

Likely cause of your problem is that you made a mistake in the process somewhere(1), and this resulted in the file not being created (or being created somewhere other than where it's expected). Suggest you go back to that point in the video and re-do it.

Or, you could just create the key.key file, containing the content (taken from the video):

Raq7IMZ4QkqK20j7lKT3bxJTgwxeJFYx4ADjTqVKdQY=

That may get you going faster than revisiting the steps that the presenter took.


(1) Re your comment that "[t]he guy even has his version of the code on github", it may be that you thought you could bypass the video and just go straight to the final code. If so, that was a mistake, as the final code expects you to have run the incomplete code in order to generate the key file.

If so, I would consider that a failing of the presenter. It would have been far better to leave the keyfile-creating code in and call it, for example, when you ran the code with python the_code.py --make-key-file.

  • Related