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

0

Comments

1 comment
  • Hello Ahmed,

    Thank you for sharing this! We're glad you were able to resolve the issue.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Didn't find what you were looking for?

New post