🐛 Bug Report: discord-command-bot Python build fails in setup.py
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Start with python/discord_command_bot/src/setup.py and compare the Go and Node.js template build steps; the issue identifies the failing relative import and the request body content type. Check how the build invokes setup.py and how Node.js registers its command. Done means the Python build completes and sends JSON, and the Go command is registered during build or its manual registration requirement is documented.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The Python variant of discord-command-bot fails to build, so it never registers its slash command.
Details
- Appwrite builds this variant with
pip install -r requirements.txt && python src/setup.py. The config is inapp/config/templates/function.phpin appwrite/appwrite. python/discord_command_bot/src/setup.pystarts withfrom .utils import throw_if_missing. A relative import fails when the file runs as a script (ImportError: attempted relative import with no known parent package), so the build fails.- With the import fixed, the request still sends form data under a JSON content type:
requests.post(..., data={...}, headers={"Content-Type": "application/json"}). Discord expects a JSON body, so this should bejson={...}. - The Go variant's build command is empty, so it doesn't register the command during the build the way the Node.js variant does (
npm run setup).
Suggested fix
- Use an absolute import (or run the script as a module) and
json=insetup.py. - Add a registration step for Go, or document that the command must be registered manually.
Notes
This turned up while adding templates to the appwrite.io integrations catalog. The catalog page points readers to the Node.js runtime for now.
cc @adityaoberai
- Ngôn ngữ chính
- HTML
- Star
- 174
- Fork
- 129
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appwrite/templates
-
bug javascript
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Dependency DashboardĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Enhancement: Add TypeScript definitions (IntelliSense) to Node.js starterCó thể đã có người làm @Ram3ez đã nhận 326 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của appwrite/templates
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
binding:python bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coollabsio/orbit#72 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
agentscope-ai/agentscope#3807 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug] Custom tool truncation leaves unused stream copies openCó thể đã có người làm @OUAO-FRANK đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày