48 bar_code_type = "code128"
49 try:
50 bar_code_mode_f = barcode.get(
51 bar_code_type, message, writer=ImageWriter())52 filename = bar_code_mode_f.save(bar_code_type)
53 await bot.send_file(
54 event.chat_id,
47 message = "SYNTAX: `.barcode <long text to include>`"
48 bar_code_type = "code128"
49 try:
50 bar_code_mode_f = barcode.get(51 bar_code_type, message, writer=ImageWriter())
52 filename = bar_code_mode_f.save(bar_code_type)
53 await bot.send_file(
49
50
51async def get_all_chats(chat_id):
52 return cli.find({'chat_id': chatid})
39 )
40 try:
41 await bot(functions.channels.EditBannedRequest(event.chat_id, i, rights))
42 except FloodWaitError as ex: 43 logger.warn("sleeping for {} seconds".format(ex.seconds))
44 sleep(ex.seconds)
45 except Exception as ex:
69 "title": title,
70 "hash": hash,
71 "age": age,
72 "size": humanbytes(size), 73 "seeds": seeds,
74 "peers": "NA"
75 })
The variable name is not defined where it is used. This will lead to an error during the runtime. Make sure there is no typo. If the name was supposed to be imported, verify that you've actually imported the name.
import os.path
if os.path.exits('setup.cfg'): # misspelled `exists`
print('Found config file')
import os.path
if os.path.exists('setup.cfg'):
print('Found config file')