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

Getting an error on performing import #14

Closed
ghost opened this issue Oct 30, 2013 · 4 comments
Closed

Getting an error on performing import #14

ghost opened this issue Oct 30, 2013 · 4 comments

Comments

@ghost
Copy link

ghost commented Oct 30, 2013

This is the error I'm getting. I looked at the code and everything seems fine, so I'm stumped.

>>> import langid
Traceback (most recent call last):
  File "", line 1, in 
    import langid
  File "C:\Python33\lib\langid\__init__.py", line 1, in 
    from langid import classify, rank
ImportError: cannot import name classify
>>>
@ghost
Copy link
Author

ghost commented Oct 30, 2013

Note that this only occurs when I install langid in my Python Lib/ directory and try to do an "import langid" from my program. If I include the langid code directly in my own program folder and load it from there, I have no problem.

@ghost
Copy link
Author

ghost commented Oct 30, 2013

I've checked StackExchange for help with the ImportError issue, but all I can find are solutions that have to do with eliminating circular imports, which is something I don't see happening here.

saffsd added a commit that referenced this issue Nov 1, 2013
@saffsd
Copy link
Owner

saffsd commented Nov 1, 2013

I am still occasionally befuddled by Python imports, but I believe the issue here has to do with relative vs absolute imports. I replicated your issue and I think I fixed it, could you please test the latest version in the Python3 branch and let me know if it works for you? Thanks!

@saffsd
Copy link
Owner

saffsd commented May 28, 2014

Closing as no problems with the fix have been reported.

@saffsd saffsd closed this as completed May 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant