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

Module aioconsole.code might conflict with the code module from the standard library #60

Closed
ronaaronson opened this issue Mar 15, 2020 · 3 comments

Comments

@ronaaronson
Copy link

I am running Python 3.6.4 under Windows 10 and when I try to import aioconsole I mmediately get the following error:

import aioconsole
2
Traceback (most recent call last):
File "", line 1, in
File "C:\Program Files\Python36\lib\site-packages\aioconsole_init_.py", line 7, in
from .code import AsynchronousConsole, interact
File "C:\Program Files\Python36\lib\site-packages\aioconsole\code.py", line 36, in
class AsynchronousConsole(code.InteractiveConsole):
AttributeError: module 'code' has no attribute 'InteractiveConsole'

@vxgmichel
Copy link
Owner

Hi @ronaaronson and thanks for the report!

I think something is broken with your python path or standard library because the module in site-packages\aioconsole\code.py is meant to import the code module from the standard library.

Somehow, python ends up importing the aioconsole.code module itself either because the PYTHONPATH is configured to find module within site-packages\aioconsole\ first or because the code module is missing from the standard library.

In any case, it was a bad idea to have a local module conflicting with another one from the standard library, as it hides the real problem. I'll rename the issue accordingly.

Thanks again!

@vxgmichel vxgmichel changed the title Can't import aioconsole under Windows Module aioconsole.code might conflict with the code module from the standard library Mar 16, 2020
@vxgmichel
Copy link
Owner

The fix will become available with v0.1.16, thanks for the report!

@vxgmichel
Copy link
Owner

v0.1.16 is out!

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

2 participants