files_upload_v2 returns internal_error when using markdown in blocks
Mantenedores costumam responder em até 5 dias
Ninguém assumiu esta issue ainda.
- #1796 de @codomposer — fechado sem integrar
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
Direção de pesquisa
Comece em AsyncWebClient.files_upload_v2 e rastreie a requisição enviada para files.completeUploadExternal, comparando o bloco de markdown com os blocos que têm sucesso. Reproduza a requisição do issue e determine se o payload do SDK ou a Slack API é responsável. Considera-se concluído quando a causa estiver isolada e o issue tiver um fix verificado ou uma limitação upstream documentada.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
files_upload_v2 returns internal_error when using markdown in blocks parameter
Reproducible in:
slack-bolt==1.25.0
slack-sdk==3.36.0
Python 3.13.5
ProductName: macOS
ProductVersion: 15.5
BuildVersion: 24F74
Darwin Kernel Version 24.5.0
The Slack SDK version
slack-bolt==1.25.0
slack-sdk==3.36.0
Python runtime version
Python 3.13.5
OS info
ProductName: macOS
ProductVersion: 15.5
BuildVersion: 24F74
Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6041
Steps to reproduce:
1. Code Example
from slack_sdk.web.async_client import AsyncWebClient
import json
# Initialize client
client = AsyncWebClient(token="xoxb-your-token")
# Prepare parameters
channel_id = "D099T7G7VHD" # DM channel
blocks = [{"type": "markdown", "text": "_**Haim Raitsev** posted a new message_\\n> test"}]
files = [{"id": "F09J0L8TDRQ", "title": "screenshot.png"}]
# Attempt to upload with blocks
response = await client.files_upload_v2(
channel=channel_id,
file_uploads=[
{
"content": b"<file_bytes_here>",
"filename": "screenshot.png",
"title": "screenshot.png"
}
],
blocks=json.dumps(blocks)
)
2. Response
{
"ok": False,
"error": "internal_error"
}
Expected result:
The file should be uploaded successfully with the rich text blocks displayed in the message, as the underlying files.completeUploadExternal:
Actual result:
The API returns {"ok": false, "error": "internal_error"} without any additional error details.
Additional Context:
This issue is reproduced only when we have a new markdown block (https://docs.slack.dev/reference/block-kit/blocks/markdown-block/) when we use other blocks the message posted correctly.
files.completeUploadExternal API Call
HTTP Request
POST https://slack.com/api/files.completeUploadExternal HTTP/1.1
Host: slack.com
Authorization: Bearer xoxb-your-token-here
Content-Type: application/x-www-form-urlencoded
Request Details
Method: POST
URL: https://slack.com/api/files.completeUploadExternal
Headers:
Authorization: Bearer xoxb-your-token-here
Content-Type: application/x-www-form-urlencoded
Body (URL-encoded):
files=[{"id":"F09J0L8TDRQ","title":"screenshot.png"}]
channel_id=D099T7G7VHD
blocks=[{"type":"markdown","text":"_**Haim Raitsev** posted a new message_\\n> test"}]
Body Parameters Breakdown
| Parameter | Value | Description |
|---|---|---|
files |
[{"id":"F09J0L8TDRQ","title":"screenshot.png"}] |
JSON array of file objects (URL-encoded) |
channel_id |
D099T7G7VHD |
DM channel ID where file will be shared |
blocks |
[{"type":"markdown","text":"_**Haim Raitsev** posted a new message_\\n> test"}] |
JSON array of blocks (URL-encoded) |
Example using cURL
curl -X POST https://slack.com/api/files.completeUploadExternal \
-H "Authorization: Bearer xoxb-your-token-here" \
-H "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode 'files=[{"id":"F09J0L8TDRQ","title":"screenshot.png"}]' \
--data-urlencode 'channel_id=D099T7G7VHD' \
--data-urlencode 'blocks=[{"type":"markdown","text":"_**Haim Raitsev** posted a new message_\\n> test"}]'
Error Response (Current Issue)
{
"ok": false,
"error": "internal_error"
}
Thank you for maintaining this excellent SDK!
- Linguagem predominante
- Python
- Estrelas
- 4k
- Forks
- 861
- Merge médio
- 3d 17h
- PRs com merge (30d)
- 10
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de slackapi/python-slack-sdk
-
Missing method from SDK // admin.users.getExpirationTalvez já em andamento @srtaalej assumiu há 3 dias. Abertabug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
slackapi/python-slack-sdk#1982 · 1 comentário ·
Mantenedores costumam responder em até 5 dias
-
auto-triage-stale needs info server-side-issue
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
slackapi/python-slack-sdk#1961 · 4 comentários ·
Mantenedores costumam responder em até 5 dias
-
auto-triage-skip discussion
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
slackapi/python-slack-sdk#1940 · 2 comentários ·
Mantenedores costumam responder em até 5 dias
-
chat_postMessage silently forwards thread_id to the API, so a threaded reply posts to the channelAbertaauto-triage-skip enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
slackapi/python-slack-sdk#1923 · 2 comentários ·
Mantenedores costumam responder em até 5 dias
-
files_upload_v2 should respect the retry handlersTalvez já em andamento @DSeaStar assumiu há 59 dias. Abertaauto-triage-skip bug python web-client
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
slackapi/python-slack-sdk#1853 · 2 comentários ·
Mantenedores costumam responder em até 5 dias
Todas as issues de slackapi/python-slack-sdk
Issues semelhantes
-
bug difficulty:2 good first issue help wanted
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
MakazhanAlpamys/Soup#1865 ·
Mantenedores costumam responder em até 1 dia
-
area: agents area: docs good first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
openapi/gknowledge#23 ·
-
useless-suppression reported for deprecated-* messages that should be exemptTalvez já em andamento @adityasinha-ghub assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
pylint-dev/pylint#11656 ·
Mantenedores costumam responder em até 1 dia
-
area:provisioning effort:S priority:P2 provider:local-libvirt risk:daytime-only status:in-progress type:bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
randomparity/kdive#3203 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
get() for StrEnumTalvez já em andamento @FeJo5952 assumiu hoje. Abertagood first issue
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
collective/icalendar#1921 · 1 comentário ·
Mantenedores costumam responder em até 1 dia