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

Sonic example doesn't work #873

Open
okonet opened this issue Feb 23, 2024 · 0 comments
Open

Sonic example doesn't work #873

okonet opened this issue Feb 23, 2024 · 0 comments

Comments

@okonet
Copy link

okonet commented Feb 23, 2024

I'm following the steps of https://vercel.com/docs/functions/runtimes/python#asynchronous-server-gateway-interface but vercel dev prints:

> Built @vercel/python@latest:api/index.py [7s]
Traceback (most recent call last):
  File "/Users/okonet/Library/Caches/com.vercel.fun/runtimes/python3/../python/bootstrap.py", line 147, in <module>
    lambda_runtime_main()
  File "/Users/okonet/Library/Caches/com.vercel.fun/runtimes/python3/../python/bootstrap.py", line 127, in lambda_runtime_main
    fn = lambda_runtime_get_handler()
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/okonet/Library/Caches/com.vercel.fun/runtimes/python3/../python/bootstrap.py", line 113, in lambda_runtime_get_handler
    mod = importlib.import_module(module_name)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/python@3.11/3.11.2_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/var/folders/8z/jnh1lm1j6_vbhbc66cyrp3zw0000gn/T/zeit-fun-677899ef016b6/vc__handler__python.py", line 13, in <module>
    __vc_spec.loader.exec_module(__vc_module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/private/var/folders/8z/jnh1lm1j6_vbhbc66cyrp3zw0000gn/T/zeit-fun-677899ef016b6/./api/index.py", line 1, in <module>
    from sanic import Sanic
  File "/var/folders/8z/jnh1lm1j6_vbhbc66cyrp3zw0000gn/T/zeit-fun-677899ef016b6/sanic/__init__.py", line 1, in <module>
    from sanic.app import Sanic
  File "/var/folders/8z/jnh1lm1j6_vbhbc66cyrp3zw0000gn/T/zeit-fun-677899ef016b6/sanic/app.py", line 18, in <module>
    from sanic.asgi import ASGIApp
  File "/var/folders/8z/jnh1lm1j6_vbhbc66cyrp3zw0000gn/T/zeit-fun-677899ef016b6/sanic/asgi.py", line 13, in <module>
    from sanic.request import Request
  File "/var/folders/8z/jnh1lm1j6_vbhbc66cyrp3zw0000gn/T/zeit-fun-677899ef016b6/sanic/request.py", line 12, in <module>
    from httptools import parse_url
  File "/var/folders/8z/jnh1lm1j6_vbhbc66cyrp3zw0000gn/T/zeit-fun-677899ef016b6/httptools/__init__.py", line 1, in <module>
    from . import parser
  File "/var/folders/8z/jnh1lm1j6_vbhbc66cyrp3zw0000gn/T/zeit-fun-677899ef016b6/httptools/parser/__init__.py", line 1, in <module>
    from .parser import *  # NoQA
    ^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'httptools.parser.parser'
LambdaError: RequestId: 8320c3a8-dde2-4116-ac93-7f77e3396e24 Process exited before completing request
    at Lambda.<anonymous> (/Users/okonet/.fnm/node-versions/v18.18.2/installation/lib/node_modules/vercel/node_modules/@vercel/fun/dist/src/index.js:110:27)
    at Generator.next (<anonymous>)
    at fulfilled (/Users/okonet/.fnm/node-versions/v18.18.2/installation/lib/node_modules/vercel/node_modules/@vercel/fun/dist/src/index.js:24:58)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant