decrypt-otpauth-files icon indicating copy to clipboard operation
decrypt-otpauth-files copied to clipboard

No module named 'click'

Open s0961000 opened this issue 4 years ago • 7 comments

I am attempting to run the decrypt_otpauth.py script against the example backup file backup-1.0.otpauthdb, but for whatever reason, I keep getting a 'ModuleNotFoundError: No module named 'click''.

I've attempted to separately install and make sure the necessary modules are installed (pip install click, pip install pyqrcode, ...), but that does not seem to help. Also, I receive errors when trying to install the bpylist module. I've attempted both on Windows and Ubuntu with no luck.

I'm sure I could be doing something wrong but figured I would post the issue here in case others are running into the same problem.

s0961000 avatar Feb 27 '21 18:02 s0961000

even after running pipenv install?

MoralCode avatar Apr 02 '21 02:04 MoralCode

Unfortunately, yes. I'm sure I'm missing something simple, but I cannot figure it out for the life of me. I tried from scratch today, built an Ubuntu vm 20.04, separately installed Python 3.7 since 3.9 is default using this link: https://www.techiediaries.com/ubuntu/install-python-3-pip-venv-ubuntu-20-04-19/.

Errors pop up for bpylist and pyqrcode when attempting to complete the pipenv install command, and for good measure I run pipenv install --python /PathToPython I then tried to separately add the modules with no luck.

s0961000 avatar Apr 02 '21 21:04 s0961000

~~What python version are you running?~~ lol whoops you mentioned it already I'm using 3.8 and was also getting errors on pipenv install so I changed the python version line in Pipfile to python_version = "3.8". Then pipenv --rm and pipenv install seemed to get the dependencies installed correctly.

then pipenv shell + python3 decrypt_otpauth.py decrypt_backup --encrypted-otpauth-backup backup-1.0.otpauthdb was successfully able to decrypt the backup.

i suspect this may also work if you set it to 3.9. My guess is that this happens because the dependencies are built using a later version of python than the one specified in pip and it cant compile with an older version or something.

If this solves the issue, I can submit a pull request to make this change in the repo if @CooperRS deems it is actually a bug

MoralCode avatar Apr 03 '21 19:04 MoralCode

Steps I performed:

  1. Set in Pipfile: python_version = "3.8"
  2. pipenv --python C:\Users\antho\AppData\Local\Programs\Python\Python38-32\python.exe (To run pipenv in 3.8)
  3. pipenv --rm
  4. pipenv install

And still got the same error I have experienced doing the same set of steps for 3.7 and 3.9 python versions:

image

@MoralCode -- did you change any specific values in the Pipfile other than the python version such as using a different bpylist version?

ivorytoast avatar Apr 03 '21 22:04 ivorytoast

@MoralCode Thank you for the suggestion, it worked! Also, after reading your response, I do recall editing the Pipfile to include python_version = "3.9" when I was trying directly from my Windows machine when I first submitted this issue. I kept getting the same error as @ivorytoast regarding the bpylist package too. I'm still not sure why I got that error, but so be it.

My steps, in case anyone else is interested as well:

  1. Hyper-V Manager --> Quick Create --> Ubuntu 20.04
  2. Install Updates, Pip, and Pipenv (sudo apt-get update sudo apt-get upgrade sudo apt install python3 -pip sudo pip3 install pipenv)
  3. Edit the Pipfile to python_version = "3.8"

Then the rest worked.

s0961000 avatar Apr 03 '21 23:04 s0961000

@ivorytoast you may need to swap your steps 2 and 3 since pipenv --rm might remove whatever the previous command set in order to have it use python 3.8.

MoralCode avatar Apr 04 '21 00:04 MoralCode

@MoralCode -- that worked! Thank you 👍

ivorytoast avatar Apr 04 '21 00:04 ivorytoast