Thriftpy / thriftpy2

Pure python approach of Apache Thrift.
MIT License
567 stars 90 forks source link

Win64 Error #168

Open gearslogy opened 3 years ago

gearslogy commented 3 years ago

the asyncio_echo has problem on server side:

[WinError 64] The specified network name is no longer available
Traceback (most recent call last):
  File "C:\Python\Python38\lib\asyncio\windows_events.py", line 457, in finish_recv
    return ov.getresult()
OSError: [WinError 64] The specified network name is no longer available

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\server.py", line 40, in handle
    yield from self.processor.process(iprot, oprot)
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\processor.py", line 62, in process
    api, seqid, result, call = yield from self.process_in(iprot)
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\processor.py", line 14, in process_in
    api, type, seqid = yield from iprot.read_message_begin()
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\protocol\binary.py", line 251, in read_message_begin
    api, ttype, seqid = yield from read_message_begin(
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\protocol\binary.py", line 28, in read_message_begin
    sz = unpack_i32((yield from inbuf.read(4)))
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\transport\base.py", line 47, in read
    return (yield from readall(self._read, sz))
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\transport\base.py", line 15, in readall
    chunk = yield from read_fn(sz - have)
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\transport\buffered.py", line 40, in _read
    buf = yield from self._trans.read(max(rest_len, self._buf_size))
  File "C:\Python\Python38\lib\site-packages\thriftpy2\contrib\aio\socket.py", line 326, in read
    buff = yield from self.reader.read(sz)
  File "C:\Python\Python38\lib\asyncio\streams.py", line 684, in read
    await self._wait_for_data('read')
  File "C:\Python\Python38\lib\asyncio\streams.py", line 517, in _wait_for_data
    await self._waiter
  File "C:\Python\Python38\lib\asyncio\proactor_events.py", line 280, in _loop_reading
    data = fut.result()
  File "C:\Python\Python38\lib\asyncio\windows_events.py", line 812, in _poll
    value = callback(transferred, key, ov)
  File "C:\Python\Python38\lib\asyncio\windows_events.py", line 461, in finish_recv
    raise ConnectionResetError(*exc.args)
ConnectionResetError: [WinError 64] The specified network name is no longer available

how to solve this problem. Thanks

aisk commented 5 months ago

Are you using powershell to run your codes? Maybe you can take a look at this: https://stackoverflow.com/questions/77049215/oserror-winerror-64-the-specified-network-name-is-no-longer-available-fastap