🐛 Bug Report: discord-command-bot Python build fails in setup.py
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- HTML
- Estrellas
- 174
- Forks
- 129
- Merge medio
- 1 d 15 h
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de appwrite/templates
-
bug javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dependency DashboardAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
Los mantenedores suelen responder en 1 día
-
Enhancement: Add TypeScript definitions (IntelliSense) to Node.js starterPosiblemente ocupada @Ram3ez la tomó hace 326 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
Todos los issues de appwrite/templates
Issues similares
-
bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
guybedford/es-module-lexer#266 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
graphql-python/graphql-core#304 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 4 días