Comments (3)
Hi @donneprosus, thanks for asking the question.
The file and message send but the mime type is not populated in the "files" property of the response. If client.files_info(file=file['id']).data['file']["mimetype"] is called afterwards the mime type will be populated.
The v2 method can take some time to finalize full file metadata, so the initial metadata could be still incomplete. This async nature is the reason why the platform had to release v2 method to resolve the runtime performance issue with v1. Mimetype and shares are the ones that may need to be fetched later on the user side. To deal with this, please call files.info API method in addition to files.upload v2 method like you're already doing.
The file and message are not sent and there is no exception thrown. Waiting does not result in the message appearing eventually. In this case the mime type is also not in the initial response from client.files_upload_v2.
I cannot guess the exact reason why this situation arised to you, but if the SDK / platform can provide more information for finding the cause of it out, we will improve it in future releases. If you haven't enabled debug-level logging yet, turning it out may help you identify the reason of the unexpected behavior:
import logging
logging.basicConfig(level=logging.DEBUG)
I hope this clarifies.
from python-slack-sdk.
👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.
from python-slack-sdk.
As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.
from python-slack-sdk.
Related Issues (20)
- Can't install async (optional) dependencies in 3.26.2 HOT 1
- VSCode (with jedi) can't suggest imports beyond base level of package HOT 5
- [error ] Failed to receive or enqueue a message: TypeError, object of type 'NoneType' has no len() HOT 1
- I am trying to post a message to slack along with a attachment i am getting error as The server responded with: {'ok': False, 'error': 'channel_not_found'} HOT 4
- websocket_client-based SocketModeClient does not reconnect after a DNS outage HOT 1
- ModuleNotFoundError: no module named 'slack' HOT 14
- client.files_upload_v2 complains about channel not found but client.files_upload works. HOT 3
- `RichTextElement.elements` items are never promoted to a proper Python object type HOT 4
- Slack WebClient Proxy Error HOT 3
- Duplicated Messages from Bot Deployed on Vercel HOT 1
- Last Bullet List Item Not Displayed on iOS Devices HOT 2
- Why we don't use certifi root certificates by default? HOT 7
- API Cursor Pagination Performance : conversations.list HOT 3
- Method Argument Alignment: chat.postMessage, chat.update HOT 2
- Async client uses blocking call when uploading file with v2 HOT 1
- Error occurred while updating the thread in slack: 'file' HOT 1
- When sending a message with metdata through the API as a bot, the metadata.event_payload is not returned HOT 2
- Need help with Python and files_completeUploadExternal method HOT 2
- Need a method to get the channel ID using the current channel name HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-slack-sdk.