{"action":"created","issue":{"url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/1008","repository_url":"https://api.github.com/repos/LonamiWebs/Telethon","labels_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/1008/labels{/name}","comments_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/1008/comments","events_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/1008/events","html_url":"https://github.com/LonamiWebs/Telethon/issues/1008","id":362082736,"node_id":"MDU6SXNzdWUzNjIwODI3MzY=","number":1008,"title":"error while sending image file","user":{"login":"rdbox","id":18515862,"node_id":"MDQ6VXNlcjE4NTE1ODYy","avatar_url":"https://avatars3.githubusercontent.com/u/18515862?v=4","gravatar_id":"","url":"https://api.github.com/users/rdbox","html_url":"https://github.com/rdbox","followers_url":"https://api.github.com/users/rdbox/followers","following_url":"https://api.github.com/users/rdbox/following{/other_user}","gists_url":"https://api.github.com/users/rdbox/gists{/gist_id}","starred_url":"https://api.github.com/users/rdbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rdbox/subscriptions","organizations_url":"https://api.github.com/users/rdbox/orgs","repos_url":"https://api.github.com/users/rdbox/repos","events_url":"https://api.github.com/users/rdbox/events{/privacy}","received_events_url":"https://api.github.com/users/rdbox/received_events","type":"User","site_admin":false},"labels":[{"id":1008177162,"node_id":"MDU6TGFiZWwxMDA4MTc3MTYy","url":"https://api.github.com/repos/LonamiWebs/Telethon/labels/can't%20reproduce","name":"can't reproduce","color":"d4c5f9","default":false},{"id":431466825,"node_id":"MDU6TGFiZWw0MzE0NjY4MjU=","url":"https://api.github.com/repos/LonamiWebs/Telethon/labels/invalid","name":"invalid","color":"e6e6e6","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-09-20T08:51:11Z","updated_at":"2018-09-20T15:40:25Z","closed_at":"2018-09-20T08:58:04Z","author_association":"NONE","body":"DON'T ASK QUESTIONS HERE.\r\n\r\nThis place is for issues with the library, so please make sure that:\r\n1. The error is in the library's code, and not in your own.\r\n2. You have already searched for your error on existing issues.\r\n3. You are testing with upstream code (pip install -U https://github.com/LonamiWebs/Telethon/archive/master.zip).\r\n\r\nIf you have a question, ask in the official Telegram group https://t.me/TelethonChat or  https://stackoverflow.com. Enhancement ideas are currently welcome, too.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"botTelegram.py\", line 13, in <module>\r\n    client.send_file('zazjivalo', '1CrBX.png')\r\n  File \"C:\\Python37\\lib\\site-packages\\telethon\\client\\uploads.py\", line 176, in send_file\r\n    msg = self._get_response_message(request, self(request), entity)\r\n  File \"C:\\Python37\\lib\\site-packages\\telethon\\client\\users.py\", line 38, in __call__\r\n    future = self._sender.send(request, ordered=ordered)\r\n  File \"C:\\Python37\\lib\\site-packages\\telethon\\network\\mtprotosender.py\", line 217, in send\r\n    message = self.state.create_message(request)\r\n  File \"C:\\Python37\\lib\\site-packages\\telethon\\network\\mtprotostate.py\", line 50, in create_message\r\n    out=True  # Pre-convert the request into bytes\r\n  File \"C:\\Python37\\lib\\site-packages\\telethon\\tl\\core\\tlmessage.py\", line 52, in __init__\r\n    body = GzipPacked.gzip_if_smaller(self.obj)\r\n  File \"C:\\Python37\\lib\\site-packages\\telethon\\tl\\core\\gzippacked.py\", line 21, in gzip_if_smaller\r\n    data = bytes(request)\r\n  File \"C:\\Python37\\lib\\site-packages\\telethon\\tl\\functions\\messages.py\", line 3426, in __bytes__\r\n    bytes(self.media),\r\n  File \"C:\\Python37\\lib\\site-packages\\telethon\\tl\\types\\__init__.py\", line 7391, in __bytes__\r\n    bytes(self.file),\r\nTypeError: cannot convert 'NoneType' object to bytes\r\n```\r\n\r\n``` python\r\n# coding: utf8\r\nfrom telethon import TelegramClient, sync\r\n\r\napi_id = 123123\r\napi_hash = '2947355a48fc4d064976bb551111111'\r\n\r\nclient = TelegramClient('session_name', api_id, api_hash)\r\nclient.start()\r\n\r\n# client.send_message('user', 'Hello! Talking to you from Telethon')\r\nclient.send_file('user', 'image.png')\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/comments/423231269","html_url":"https://github.com/LonamiWebs/Telethon/issues/1008#issuecomment-423231269","issue_url":"https://api.github.com/repos/LonamiWebs/Telethon/issues/1008","id":423231269,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzIzMTI2OQ==","user":{"login":"Lonami","id":6297805,"node_id":"MDQ6VXNlcjYyOTc4MDU=","avatar_url":"https://avatars0.githubusercontent.com/u/6297805?v=4","gravatar_id":"","url":"https://api.github.com/users/Lonami","html_url":"https://github.com/Lonami","followers_url":"https://api.github.com/users/Lonami/followers","following_url":"https://api.github.com/users/Lonami/following{/other_user}","gists_url":"https://api.github.com/users/Lonami/gists{/gist_id}","starred_url":"https://api.github.com/users/Lonami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lonami/subscriptions","organizations_url":"https://api.github.com/users/Lonami/orgs","repos_url":"https://api.github.com/users/Lonami/repos","events_url":"https://api.github.com/users/Lonami/events{/privacy}","received_events_url":"https://api.github.com/users/Lonami/received_events","type":"User","site_admin":false},"created_at":"2018-09-20T15:40:25Z","updated_at":"2018-09-20T15:40:25Z","author_association":"MEMBER","body":"You must have done something strange with your `pip` packages, **and this is not an issue with the Telethon library itself**, so you're not asking in the right place."}}
{"actor":{"display_login":"Lonami"}}