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

Example code import does not work in Python3 #11

Closed
liffiton opened this issue Jul 18, 2017 · 1 comment
Closed

Example code import does not work in Python3 #11

liffiton opened this issue Jul 18, 2017 · 1 comment
Assignees
Labels

Comments

@liffiton
Copy link

$ python3
Python 3.6.1 (default, Mar 21 2017, 21:49:16)
[GCC 5.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from tsl2561 import TSL2561
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'TSL2561'

I believe the following does work:

from tsl2561.tsl2561 import TSL2561

I'm not sure, but maybe a tweak to __init__.py would make this work in both Python 2 and 3?

@sim0nx sim0nx added the bug label Jul 31, 2017
@sim0nx sim0nx self-assigned this Jul 31, 2017
@sim0nx
Copy link
Owner

sim0nx commented Jul 31, 2017

Thanks for reporting that!
I have fixed the import issue on python3 and pushed a new version to pypi

Please let me know should you have any further problems.

Fixed by ed41678

@sim0nx sim0nx closed this as completed Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants