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

server.py, line 282: NotImplementedError #1703

Closed
p-hash opened this issue Mar 8, 2017 · 6 comments
Closed

server.py, line 282: NotImplementedError #1703

p-hash opened this issue Mar 8, 2017 · 6 comments
Labels

Comments

@p-hash
Copy link

p-hash commented Mar 8, 2017

Long story short

I get this error:

Error handling request
Traceback (most recent call last):
  File "/home/paul/mpb-v2/env/lib/python3.4/site-packages/aiohttp/server.py", line 282, in start
    self.transport.write_eof()
  File "/usr/lib64/python3.4/asyncio/transports.py", line 111, in write_eof
    raise NotImplementedError
NotImplementedError

It was mentioned before in #1537

Steps to reproduce

Thanks to @freekvw we have the code that reproduces the issue.
Error happens when you upload a file larger than 50KiB

from aiohttp import web
import ssl
import asyncio

@asyncio.coroutine
def handle(request):
    text = """<html><body>
<form action="/upload" method="post" accept-charset="utf-8"
      enctype="multipart/form-data">
    <input name="file" type="file" value=""/><br />
    <input type="submit" value="submit"/>
</form></body></html>"""
    return web.Response(text=text, content_type='text/html')

@asyncio.coroutine
def handleUpload(request):
    return web.json_response({})

app = web.Application()
app.router.add_get('/', handle)
app.router.add_post('/upload', handleUpload)

import proxybot_config as config
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
context.load_cert_chain(config.SSL_CERT, config.SSL_PKEY)

web.run_app(app,
  host=config.LISTEN, 
  port=config.PORT, 
  ssl_context=context)

Your environment

OS: Fedora 23
Python 3.4.3
aiohttp 1.3.3

@fafhrd91
Copy link
Member

fafhrd91 commented Mar 8, 2017

@p-hash could you try this repo https://github.com/fafhrd91/aiohttp

@ttyridal
Copy link

Found this as I'm experiencing the same issue. Ubuntu 16.10, Python 3.5.2, aiohttp 1.3.3

@fafhrd91 Your repo seems to have fixed the issue for me at least..

That's while noting that I got

x86_64-linux-gnu-gcc: error: aiohttp/_websocket.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
************************************************************
Cannot compile C accelerator module, use pure python version

during setup.py

@fafhrd91
Copy link
Member

do you have cython installed?

@ttyridal
Copy link

good point.. still working and now, no build errors.

@fafhrd91
Copy link
Member

fixed in master and in 1.3 branch
will release 1.3.4 soon

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants