Coder Social home page Coder Social logo

Comments (13)

stonebig avatar stonebig commented on June 20, 2024

hum, I see some maybe hope there, but not expert in the thing:
encode/uvicorn#423

from hypercorn.

pgjones avatar pgjones commented on June 20, 2024

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.

stonebig avatar stonebig commented on June 20, 2024

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.

stonebig avatar stonebig commented on June 20, 2024

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.

stonebig avatar stonebig commented on June 20, 2024

well, with hypercorn-0.9.0dev master it works now on Python-3.8. Thanks a lot !

from hypercorn.

pgjones avatar pgjones commented on June 20, 2024

Great, thanks for confirming.

from hypercorn.

ghostzero192 avatar ghostzero192 commented on June 20, 2024

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.

pgjones avatar pgjones commented on June 20, 2024

@ghostzero192 If you make use of the master branch it will work, specifically a8ba7f6.

from hypercorn.

ghostzero192 avatar ghostzero192 commented on June 20, 2024

from hypercorn.

ghostzero192 avatar ghostzero192 commented on June 20, 2024

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.

pgjones avatar pgjones commented on June 20, 2024

@ghostzero192 Is it just Python 3.7 -> 3.8 that changed (between the working and not working versions)?

from hypercorn.

ghostzero192 avatar ghostzero192 commented on June 20, 2024

@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.

pgjones avatar pgjones commented on June 20, 2024

@ghostzero192 I think this is fixed with 0.9.2, see 42c2f6f

from hypercorn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.