New submission from Hector E. Socarras <hsocarras1...@gmail.com>:

I test de sample Echo Tcp Server on 
https://docs.python.org/3.8/library/asyncio-protocol.html. When I run de server 
i got the following error from python interpreter
Traceback (most recent call last):
  File "server_test.py", line 1, in <module>
    import asyncio
  File 
"C:\Users\Hector\AppData\Local\Programs\Python\Python37\lib\asyncio\__init__.py",
 line 8, in <module>
    from .base_events import *
  File 
"C:\Users\Hector\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py",
 line 23, in <module>
    import socket
  File "C:\Users\Hector\pynode\net\socket.py", line 7, in <module>
    class NetBaseProtocol(asyncio.Protocol, EventEmitter):
AttributeError: module 'asyncio' has no attribute 'Protocol'

the problem was that i have a module named socket in the same folder. But I 
think that base_events.py should import the apropiate socket module using 
relative import or supplying full path for his socket import.

----------
components: asyncio
messages: 361444
nosy: asvetlov, hsocarras, yselivanov
priority: normal
severity: normal
status: open
title: asyncio.Protocol on windows 10 x64
type: compile error
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39563>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to