Ask coding questions

← Back to all posts
Help me with this error
Flyingcrabs (29)

i am confused because it says a error on line 5 then on 800 something but i didnt write that much lines

Comments
hotnewtop
btfuss (177)

So the 800 line error is the module not functioning in the way it should. The module is having an error, not your program. The error is the value of the db[key] has to be a string it looks like, so to fix line 5 and 6:

db["TopQA"] = "0"
db["AllQ"] = "1"

You can also convert these keys back into integers with the int() function.

btfuss (177)

@Flyingcrabs
Line 47:
Are you trying to set your var to rightQ? If so just rewrite your line like this:

rightQ=int(db["TopQA"])

If you are trying to set the db variable to rightQ you don't need to make it an integer:

db["TopQA"] = rightQ

Also you make a typo because on line 47 you called it:
db["TopQa]

Flyingcrabs (29)

sorry to disappoint you but it is not working
@btfuss

Flyingcrabs (29)

umm should db["TopQA]=str(rightQ)
@btfuss

btfuss (177)

@Flyingcrabs Here is the "fixed" code:
Fix some of your indents never have a one-space indent.
https://replit.com/@btfuss/HumongousGuiltyBetaversion

btfuss (177)

@Flyingcrabs hey bro if i solved ur question can u mark