UTC bug at utils.py file
I was trying to run some of my codes at d-wave and ran into the following error (note: if you are using python3 you shouldn't see this error. I received this error when I used python2, now both 2&3 work fine, the fix is below):
---------------------------------------------------------------------------------------------------------
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/dwave_cloud_client-0.4.10-py2.7.egg/dwave/cloud/utils.py", line 4, in <module>
from dateutil.tz import UTC
ImportError: cannot import name UTC
---------------------------------------------------------------------------------------------------------
Fix:
Go to the "utils.py" file and do the following change:
#from dateutil.tz import UTC
from pytz import UTC
You might need to edit utils.py as a root in mac.
Enjoy / Ahmed
Comments
Hello Ahmed,
Thank you for sharing this! We're glad you were able to resolve the issue.
Please sign in to leave a comment.