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

Vercel部署时报错,Docker部署也报错 #20

Closed
behinder85 opened this issue Apr 24, 2024 · 0 comments · Fixed by #21
Closed

Vercel部署时报错,Docker部署也报错 #20

behinder85 opened this issue Apr 24, 2024 · 0 comments · Fixed by #21

Comments

@behinder85
Copy link

behinder85 commented Apr 24, 2024

Vercel

[01:20:20.049] Running build in Washington, D.C., USA (East) – iad1
[01:20:23.593] Cloning github.com/behinder85/bing-wallpaper-api (Branch: main, Commit: 43bd108)
[01:20:23.610] Skipping build cache, deployment was triggered without cache.
[01:20:24.127] Cloning completed: 533.747ms
[01:20:24.431] Running "vercel build"
[01:20:24.873] Vercel CLI 33.7.1
[01:20:25.059] Error: Unable to find any supported Python versions.
[01:20:25.060] Learn More: http://vercel.link/python-version
[01:20:25.262]

似乎源码里无Pipfile

Docker

报500“Internal Server Error

ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/h11_impl.py", line 407, in run_asgi
result = await app( # type: ignore[func-returns-value]
File "/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in call
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/site-packages/fastapi/applications.py", line 270, in call
await super().call(scope, receive, send)
File "/usr/local/lib/python3.8/site-packages/starlette/applications.py", line 124, in call
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 184, in call
raise exc
File "/usr/local/lib/python3.8/site-packages/starlette/middleware/errors.py", line 162, in call
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.8/site-packages/starlette/middleware/cors.py", line 84, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/site-packages/starlette/middleware/exceptions.py", line 79, in call
raise exc
File "/usr/local/lib/python3.8/site-packages/starlette/middleware/exceptions.py", line 68, in call
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in call
raise e
File "/usr/local/lib/python3.8/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in call
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 706, in call
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 276, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.8/site-packages/starlette/routing.py", line 66, in app
response = await func(request)
File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 235, in app
raw_response = await run_endpoint_function(
File "/usr/local/lib/python3.8/site-packages/fastapi/routing.py", line 161, in run_endpoint_function
return await dependant.call(**values)
File "/api/main.py", line 108, in random
return random_one(w,h,uhd,mkt)
File "/api/mongodbapi.py", line 65, in random_one
url=query_random_one(mkt)['url']
KeyError: 'url'

MONGODB_URI如下:
MONGODB_URI=mongodb+srv://<name>:<password>@<org>.84evxsr.mongodb.net/
博客和readme均未展示MONGODB_URI,不知是否正确(用<>隐去个人信息)

@behinder85 behinder85 changed the title Vercel部署时报错 Vercel部署时报错,Docker部署也报错 Apr 24, 2024
@flow2000 flow2000 linked a pull request May 12, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant