@Coder100 I found the solution, apparently a dict in the database can't have a float as a value.
The xp is normally an int but the multiplier made it a float so i now round that to an int.
And I now store the multipliers as a string which i can later convert back to a float
Error when accessing replit database in python
Whenever i try to access my database with
value = db["key"]
I get the errorTypeError: unexpected type "float"
.This never happened before, can someone tell me what this means?
the file with problems = cogs/xp.py
your repl is private so we can't see your code.
i see, what are you exactly trying to do here?

@ZoutigeWolfthe types are already correct, and no type will ever need to be converted. Also, these values don't appear to be valid dict values.
dict()
it was just a test i forgot to removewhat line?
@ZoutigeWolfexample:
xpDB = db["xp"]
well i mean you put the dict function on all of them so you should remove that
@ZoutigeWolfno you haven't?
multiDB = db["xpMulti"]
strange maybe the file didn't save
@ZoutigeWolfThe xp is normally an int but the multiplier made it a float so i now round that to an int.
And I now store the multipliers as a string which i can later convert back to a float
but when i stored info on my own pc in JSON for a project I was able to store integers and floats
no that's ridiculous json can have numbers as the key
however, dicts cannot.
@xfinnbarnice solution
@ZoutigeWolfyeah I thought the python db would get all these nitty types down for you, but I guess not
in json, floats and ints are indistinguishable and everything is a float
@ZoutigeWolf