Category : json

import json import sqlite3 conn = sqlite3.connect(‘logdata.sqlite’) cur = conn.cursor() cur.executescript(”’ DROP TABLE IF EXISTS org_info; CREATE TABLE org_info ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, org_name TEXT UNIQUE, sub TEXT UNIQUE, first_name TEXT UNIQUE, last_name TEXT UNIQUE, email TEXT UNIQUE ); ”’) fname = input(‘Enter file name: ‘) if not ".json" in ..

Read more

i have url like this url = "www.web.com/page_number=1/latitude=80.32/longitude=123.34" I would love to loop data and change these value >> page_number, latitude , longtitude . but i dont know how to add variable. expected value = round1 : url = "www.web.com/page_number=1/latitude=80.32/longitude=123.34" round1 : url = "www.web.com/page_number=2/latitude=83.12/longitude=113.334" ps. double quote is needed. please help . Source: Python ..

Read more

Hello everyone so i am new to discord.py and i want to make a leaderboard command guildwise and here is my code import json import discord from tabulate import tabulate from discord.ext import commands from PIL import Image, ImageFont, ImageDraw class ChatLeaderboard(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() async def on_message(self, message): if not ..

Read more

I’m very new to Python, so I apologize in advance for my stupid questions. I’m trying to run this app This is the Python code: def load_json(path): with open(path, "r") as json_file: data = json.load(json_file) validate(instance=data, schema=schema) return data I followed all the steps and think I did everything right, but once I run the ..

Read more

I make a discordbot and I want to delete key (channel id) and value (message id) of a .json file but I’ve this error: Ignoring exception in on_raw_reaction_add Traceback (most recent call last): File "C:Usersbaron_btjit4iAppDataLocalProgramsPythonPython39libsite-packagesdiscordclient.py", line 343, in _run_event await coro(*args, **kwargs) File "c:Usersbaron_btjit4iDesktopAutrebotCogsticket.py", line 213, in on_raw_reaction_add data.pop(str(channell.id)) KeyError: ‘932014068682858507’ My json file like ..

Read more