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

ImportError: No module named controls.link #9

Closed
ragred opened this issue Nov 5, 2015 · 2 comments
Closed

ImportError: No module named controls.link #9

ragred opened this issue Nov 5, 2015 · 2 comments
Assignees

Comments

@ragred
Copy link

ragred commented Nov 5, 2015

Newbie question... Installed webium 1.0.7 on Windows workstation running Python 2.7.9. When trying to run the basic usage example I get error

Traceback (most recent call last):
File "webium.py", line 4, in
from webium.controls.link import Link
File "C:\Users\tiko\PycharmProjects\webium\webium.py", line 4, in
from webium.controls.link import Link
ImportError: No module named controls.link

Don't know what to do...?

@ufranske
Copy link
Contributor

ufranske commented Nov 5, 2015

It looks like your issue is related to namespace resolution. Your module has the same name (webium.py) as webium package does. So, your module doesn't see webium's package. In order to resolve this issue in Python you can:

  1. rename your module
  2. add from __future__ import absolute_import to the beginning of your module

@ufranske ufranske self-assigned this Nov 5, 2015
@ragred
Copy link
Author

ragred commented Nov 5, 2015

Changing the filename did the trick, thank you x)

@ragred ragred closed this as completed Nov 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants