Auth script throws `ModuleNotFoundError` on Windows
Closed this issue · 7 comments
So I'm on Windows and I think the instructions are more for OSX/Linux but I've stumbled my way through getting the syntax differences handled for installing all the virtualenv.
I'm getting
C:\Users\austi\OneDrive\Documents\GitHub\simplisafe-python>py script\auth Traceback (most recent call last): File "C:\Users\austi\OneDrive\Documents\GitHub\simplisafe-python\script\auth", line 8, in <module> from simplipy.util.auth import ( ModuleNotFoundError: No module named 'simplipy.util'
Any ideas? I've tried pip install simplisafe-python and simplipy
It looks like your path isn't set correctly. I'm not a Windows user, so unfortunately, I'm not versed on how Python imports work on Windows.
Are you using the Windows Subsystem for Linux (WSL)?
I was not using WSL, but I just tried that and it doesn't interface with the web browser since its running in its own container it can't open the browser. However, it did work that way without a hitch, besides the browser part.
I'm now going to give it one last try using Anaconda. I have no idea why that would work over just a straight terminal in Windows, but worth a shot.
Ok, so this is actually working...almost
- Install Anaconda
- Open Command prompt from Anaconda Navigator
- navigate to Documents folder in user account, run GIT clone cmd from usage guide
- Run pip install simplisafe-python
- Run poetry commands from "script\setup" (maybe not needed?)
- Clear cookies, make sure you are logged out of simplisafe webapp (otherwise it wont generate a MFA code)
- Run "py script\auth" from command prompt
- Hit Enter to open browser, immediately right click page and go to inspect
- Log-in to website and enter MFA, you should see code in console of dev tools
- Enter code from console back into command prompt and receive "code verifier" and confirmation that API is ready
Now here is where I'm stuck, I enter the code into Home Assistant after installing SimpliSafe integration (and it keeps saying invalid authentication) and I have NO idea why. I did get the code to change after logging out of everything and get MFA to work, but something still isn't right. It could now be a HASS issue.
Does the URL from which you grabbed the code start with com.simplisafe.mobile
(from these docs: https://simplisafe-python.readthedocs.io/en/latest/usage.html#authentication)?
Yes those are instructions I've been using and I'm getting the code with the URL mentioned but that is giving error. I ran out of mfa attempts so will try again tomorrow
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.