maraujop / requests-oauth

Python's Requests OAuth (Open Authentication) plugin
BSD 3-Clause "New" or "Revised" License
188 stars 33 forks source link

Can't import modules correctly #41

Open lostVkng opened 11 years ago

lostVkng commented 11 years ago

There is something inncorrect with the importing of modules,

python3.2
from oauth_hook import OAuthHook

leads to

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/requests_oauth-0.4.1-py3.2.egg/oauth_hook/__init__.py", line 1, in <module>
    from hook import OAuthHook
ImportError: No module named hook

I tried moving the hook code to the init.py but then the same error comes up with auth.py and just creates more issues.

Also note: I tried it in python3.3 and same issue

    from oauth_hook import OAuthHook
  File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/oauth_hook/__init__.py", line 1, in <module>
    from hook import OAuthHook
ImportError: No module named 'hook'
yash-chowdhary commented 6 years ago

I also faced this issue. Is there a solution?

sana-farooqui commented 6 years ago

It only works with Python2