muhammedfurkan / TelethonUserBot

File opened without the with statement PTC-W0010
Anti-pattern
Critical
3 years ago3 years old
Use the with statement to open a file
38            headers = {
39                "Content-Type": previous_message.media.document.mime_type,
40            }
41            data = open(required_file_name, "rb").read()42            response = requests.post(
43                Config.IBM_WATSON_CRED_URL + "/v1/recognize",
44                headers=headers,