Coder Social home page Coder Social logo

Comments (10)

BobDotCom avatar BobDotCom commented on August 27, 2024

Well for starters none of the code isn't really meant to be hosted in any bot besides the main one. Anyways this is probably happening because you didn't pass correct arguments to the command.

from bobdotbot.

CutieRei avatar CutieRei commented on August 27, 2024

well first of all it seems that the number you are providing on the f string is None and the query is attempting to add another column which already exists

from bobdotbot.

CutieRei avatar CutieRei commented on August 27, 2024

Well for starters none of the code isn't really meant to be hosted in any bot besides the main one. Anyways this is probably happening because you didn't pass correct arguments to the command.

actually the argument is filled but the database result is null which explains why the column name is itemNone and it seems they are hosting on the bot itself they just mean selfhost which means hosting locally

from bobdotbot.

 avatar commented on August 27, 2024

So, I am passing in the wrong arguments?

from bobdotbot.

CutieRei avatar CutieRei commented on August 27, 2024

So, I am passing in the wrong arguments?

no you did not but the database query returned None in rows[-1][0] thats the issue

the rows itself is not empty but the index [-1][0] returned None

from bobdotbot.

 avatar commented on August 27, 2024

That means rows[-1][0] doesn't exist. But how is that possible?

from bobdotbot.

CutieRei avatar CutieRei commented on August 27, 2024

That means rows[-1][0] doesn't exist. But how is that possible?

its possible because the column value can be null

from bobdotbot.

 avatar commented on August 27, 2024

Right, so in aiosqlite when you do rows = await cursor.fetchall() isn't the first index (i.e. [-1]) the last from the right. Which is the latest. In that the first index would be the ID of the item. Is this a bug with aiosqlite? Or are the indexes wrong?

from bobdotbot.

CutieRei avatar CutieRei commented on August 27, 2024

Right, so in aiosqlite when you do rows = await cursor.fetchall() isn't the first index (i.e. [-1]) the last from the right. Which is the latest. In that the first index would be the ID of the item. Is this a bug with aiosqlite? Or are the indexes wrong?

as i said the column value is null try and print rows before indexing them

rows = await cursor.fetchall()
print(rows)
numbers = rows[-1][0]

from bobdotbot.

 avatar commented on August 27, 2024

k I fixed this, thanks @ReyterYT

from bobdotbot.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.