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

Using willie on Windows #822

Closed
Kinematics opened this issue Jun 23, 2015 · 4 comments
Closed

Using willie on Windows #822

Kinematics opened this issue Jun 23, 2015 · 4 comments
Labels

Comments

@Kinematics
Copy link

After getting past installation issue #811, and unicode issue #821, I've run into a brick wall on getting willie to run on Windows due to an import bug of some sort. It may possibly be a configuration issue on my part, but after spending all day on this, I'm just submitting it here.

The error is on line 15 of the willie.py script:

from willie.tools import stderr

Completely trivial, and expected to work. If I go into the python command environment and enter that line, it works as expected.

However if I run willie from the command prompt, I instead get this error:

Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 2218, in _find_and_load_unlocked
AttributeError: 'module' object has no attribute '__path__'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python34\Scripts\willie.py", line 15, in <module>
    from willie.tools import stderr
  File "C:\Python34\Scripts\willie.py", line 15, in <module>
    from willie.tools import stderr
ImportError: No module named 'willie.tools'; 'willie' is not a package

I don't understand the whole package/module environment of python well enough to really understand why it's failing, but for whatever reason, the __path__ variable is never set, leading to the above failure.

The only thing I've been able to find is that __path__ is supposed to be getting set automatically. If I do an import in the python environment, I can examine __path__ and __file__, and they are both set correctly. I just don't understand why it won't work under normal usage.

Any help is appreciated.

@embolalia
Copy link
Contributor

How did you install Willie? I don't know why __path__ would not be set, either. I know there are some weird things in Willie (which are fixed for 6.0) that make importing it a bit fragile, but I'm not sure why it would break on Windows.

@Kinematics
Copy link
Author

I downloaded the .tar.gz, unpacked it and edited the SOURCES.txt file to fix the bug in issue #811 (deleting the /tmp entry on line 5), re-packed it, and used pip install on the .tar.gz.

@Kinematics
Copy link
Author

Based on an answer provided on StackOverflow, I'm now able to run willie. Just changed the file in scripts from willie.py to run-willie.py to keep it from failing due to recursion.

@embolalia
Copy link
Contributor

We're using a setuptools entry point now when you install from pip, so this should no longer be an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants