Comments (13)
hum, I see some maybe hope there, but not expert in the thing:
encode/uvicorn#423
from hypercorn.
Hmm, this used to be an AttributeError
, I think Python 3.8 has changed the effective error. Fixed in a8ba7f6. You should be able to use Hypercorn with Python 3.7 without this issue.
from hypercorn.
maybe for some under Anaconda, but it doesn't work either on my Python-3.7.
... I'll wait to see uvicorn/hypercorn next releases, I hoped it was something obvious.
C:\WinP\bd37\bucod\WPy64-3750b1\notebooks>hypercorn hello:app
Traceback (most recent call last):
File "C:\WinP\bd37\bucod\WPy64-3750b1\python-3.7.5rc1.amd64\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\WinP\bd37\bucod\WPy64-3750b1\python-3.7.5rc1.amd64\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\WinP\bd37\bucod\WPy64-3750b1\python-3.7.5rc1.amd64\Scripts\hypercorn.exe\__main__.py", line 9, in <module>
File "C:\WinP\bd37\bucod\WPy64-3750b1\python-3.7.5rc1.amd64\lib\site-packages\hypercorn\__main__.py", line 229, in main
run(config)
File "C:\WinP\bd37\bucod\WPy64-3750b1\python-3.7.5rc1.amd64\lib\site-packages\hypercorn\run.py", line 34, in run
worker_func(config)
File "C:\WinP\bd37\bucod\WPy64-3750b1\python-3.7.5rc1.amd64\lib\site-packages\hypercorn\asyncio\run.py", line 167, in asyncio_worker
shutdown_trigger=shutdown_trigger,
File "C:\WinP\bd37\bucod\WPy64-3750b1\python-3.7.5rc1.amd64\lib\site-packages\hypercorn\asyncio\run.py", line 212, in _run
loop.add_signal_handler(signal.SIGINT, _signal_handler)
File "C:\WinP\bd37\bucod\WPy64-3750b1\python-3.7.5rc1.amd64\lib\asyncio\events.py", line 540, in add_signal_handler
raise NotImplementedError
NotImplementedError
C:\WinP\bd37\bucod\WPy64-3750b1\notebooks>
pip list attached, in case there is a subtle detail there
toto.txt
from hypercorn.
so I can get today uvicorn working on Python-3.7 and Python-3.8. I don't catch what detail I have wrong with hypercorn.
from hypercorn.
well, with hypercorn-0.9.0dev master it works now on Python-3.8. Thanks a lot !
from hypercorn.
Great, thanks for confirming.
from hypercorn.
having this exact problem with python 3.7.5 x64, any idea how to fix this?
Traceback (most recent call last):
File "c:\Program Files\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\Program Files\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Zero\Documents\Packs\Python\Envs\AsyncApis\Scripts\hypercorn.exe\__main__.py", line 9, in <module>
File "c:\users\zero\documents\packs\python\envs\asyncapis\lib\site-packages\hypercorn\__main__.py", line 234, in main
run(config)
File "c:\users\zero\documents\packs\python\envs\asyncapis\lib\site-packages\hypercorn\run.py", line 34, in run
worker_func(config)
File "c:\users\zero\documents\packs\python\envs\asyncapis\lib\site-packages\hypercorn\asyncio\run.py", line 167, in asyncio_worker
shutdown_trigger=shutdown_trigger,
File "c:\users\zero\documents\packs\python\envs\asyncapis\lib\site-packages\hypercorn\asyncio\run.py", line 212, in _run
loop.add_signal_handler(signal.SIGINT, _signal_handler)
File "c:\Program Files\Python37\lib\asyncio\events.py", line 540, in add_signal_handler
raise NotImplementedError
NotImplementedError
from hypercorn.
@ghostzero192 If you make use of the master branch it will work, specifically a8ba7f6.
from hypercorn.
from hypercorn.
using python 3.8 on windows i get this error
hypercorn main:app -w 2
Running on 127.0.0.1:8000 over http (CTRL + C to quit) Process Process-1: Traceback (most recent call last): File "c:\Program Files\Python38\lib\multiprocessing\process.py", line 313, in _bootstrap self.run() File "c:\Program Files\Python38\lib\multiprocessing\process.py", line 108, in run self._target(*self._args, **self._kwargs) File "c:\program files\python38\testenv\lib\site-packages\hypercorn\asyncio\run.py", line 164, in asyncio_worker _run( File "c:\program files\python38\testenv\lib\site-packages\hypercorn\asyncio\run.py", line 220, in _run loop.run_until_complete(main(shutdown_trigger=shutdown_trigger)) File "c:\Program Files\Python38\lib\asyncio\base_events.py", line 608, in run_until_complete return future.result() File "c:\program files\python38\testenv\lib\site-packages\hypercorn\asyncio\run.py", line 114, in worker_serve await asyncio.start_server( File "c:\Program Files\Python38\lib\asyncio\streams.py", line 94, in start_server return await loop.create_server(factory, host, port, **kwds) File "c:\Program Files\Python38\lib\asyncio\base_events.py", line 1469, in create_server server._start_serving() File "c:\Program Files\Python38\lib\asyncio\base_events.py", line 309, in _start_serving sock.listen(self._backlog) OSError: [WinError 10022] An invalid argument was supplied
from hypercorn.
@ghostzero192 Is it just Python 3.7 -> 3.8 that changed (between the working and not working versions)?
from hypercorn.
@pgjones
in python 3.7 everything works fine if i use the branch that you recomended me (0.9.0+dev), but in python 3.8 neither the master branch (i mean "pip install hypercorn") or the 0.9.0+dev work
from hypercorn.
@ghostzero192 I think this is fixed with 0.9.2, see 42c2f6f
from hypercorn.
Related Issues (20)
- Http3
- Support asyncio/Trio through AnyIO HOT 3
- Question about use `taskgroup` in test suite HOT 2
- disconnect detection broken when running with trio HOT 7
- Statsd logger raises exception in v0.16.0 HOT 1
- Need clear documentation for configuration HOT 1
- Is Hypercorn pre-fork or post-fork? How can I integrate it with opentelemetry? HOT 4
- test_startup_failure fails with trio 0.25.0 HOT 3
- Performance issue HOT 2
- Is Hypercorn server serving up response using HTTP/2 HOT 1
- FastAPI deployed with hypercorn in GCP Cloud Run returning 503 sporadically HOT 6
- Entire hypercorn server crashes when receiving trailing data on a websocket upgrade request HOT 1
- Occassionally with HTTP2, server does not send "End Stream" flag as True when all the data has been sent in response
- Can the ASGI application be specified in the config file?
- How do I log username in access log? HOT 1
- Getting permission Error [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions when running FastAPI in IIS
- Need clarification on trusted hops HOT 1
- Reload up to date SSL certificates without restarting server?
- pytest-cov / pytest-sugar not included in pyproject.toml
- TCP server keep-alive times out even though data is being received. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hypercorn.