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

Module object has no attribute __version__ #24

Closed
BrianSidebotham opened this issue Apr 6, 2017 · 5 comments
Closed

Module object has no attribute __version__ #24

BrianSidebotham opened this issue Apr 6, 2017 · 5 comments
Assignees
Labels

Comments

@BrianSidebotham
Copy link

BrianSidebotham commented Apr 6, 2017

  • Windows 7 Pro 64-bit

  • Python 2.7.13 and 3.6.1

  • Unknown

Hi Guys,

After using both 2.7.13 and 3.6.1 and installing by python -m pip install azure-iothub-device-client and trying to run the sample, I get the following error message:

...Desktop\azure-iot-sdk-python\device\samples>python iothub_client_sample.py

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]
Traceback (most recent call last):
  File "iothub_client_sample.py", line 221, in <module>
    print ( "IoT Hub for Python SDK Version: %s" % iothub_client.__version__ )
AttributeError: 'module' object has no attribute '__version__'

It's the same message for both versions of Python.
Am I doing something fundamentally wrong?

@zolvarga
Copy link
Contributor

zolvarga commented Apr 6, 2017

@BrianSidebotham

No, you are doing OK. This is a known issue, we are working on the fix.

Here is how you can unblock yourself:
Got to the iothub_client_sample.py and comment out line 226 like:
#print ( "IoT Hub for Python SDK Version: %s" % iothub_client.version )

This line just an additional info, and not needed to run the sample.

Best Regards,
Zoltan

@tameraw tameraw added bug and removed help wanted labels Apr 6, 2017
@BrianSidebotham
Copy link
Author

Thanks @zolvarga

It's just not my day for simple things holding me up. Thanks for letting me know, at least that unblocks me and I can move forward.

Sorry - I should have tried commenting out the offending line, but I just thought if it couldn't even do that then it's all fundamentally broken. Looking forward to giving things a try now. Thanks.

@BrianSidebotham
Copy link
Author

Oh, a self compiled version on Linux with Python 2.7.12 works fine though. 👍

@zolvarga
Copy link
Contributor

zolvarga commented Apr 6, 2017

Awesome! Thanks for letting me know! :)

@tameraw
Copy link

tameraw commented Apr 10, 2017

An update to the sample has been made and released.

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

3 participants