Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot import name 'TOTPAuthentication' from 'HologramAuth' (unknown location) #54

Open
danistrigaro opened this issue Jul 31, 2020 · 5 comments
Labels
bug for issues

Comments

@danistrigaro
Copy link

Describe the problem

I'm on ubuntu 20.04. I installed the packacke as described in the quickstart guide.
The problem is that the HologramAuth package seems to be empty.
When I try to run:

sudo hologram send "Hello World"

or when I try to update the firmware this error appears:

ImportError: cannot import name 'TOTPAuthentication' from 'HologramAuth' (unknown location)

I think the problem regards this line in the HologramCloud.py file when it tries to import such libraries that does not exists anywhere:

from HologramAuth import TOTPAuthentication, SIMOTPAuthentication

@danistrigaro danistrigaro added the bug for issues label Jul 31, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.86. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@danistrigaro
Copy link
Author

I think there is a connection with this issue #20 .
I had the same problem with Ubuntu 20.04 and python 3.8. For this reason I looked into the HologramAuth folder and I saw only .pyc files compiled probably with a different operating system. So I deleted them and consequently, the issue in the object appeared.

@DomAmato
Copy link
Contributor

DomAmato commented Aug 1, 2020

Yeah this is an issue with trying to distribute compiled byte code as a python package. As far as I can tell there is no way to compile for different python versions and then pack it all together and have it work on different versions of python. We do this as a security measure for the authentication package but the side effect of that is that it only works for python 3.7 which is the current default python 3 package on raspberry pis. If you tried to use the SDK on python 3.8 it would give you a bad magic number error like the issue you linked as well.

@openAccess
Copy link

You do realize one can simply use uncompyle6 to decompile the bytecode.

@DomAmato
Copy link
Contributor

yes we are aware of that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug for issues
Projects
None yet
Development

No branches or pull requests

3 participants