DEV Community

Free Python Code
Free Python Code

Posted on

[SOlVED] SmileyDB3 Error KeyError: "<class 'float'>" in Insert

/AppData/Local/Programs/Python/Python312/Lib/site-packages/SmileyDB3/SmileyDB3.py
Traceback (most recent call last):
File "c:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\SmileyDB3\SmileyDB3.py", line 344, in
items.Insert(data = {
File "c:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\SmileyDB3\SmileyDB3.py", line 78, in Insert
(_index {self.types['INDEX']}, {self.get_types(data)})
^^^^^^^^^^^^^^^^^^^^
File "c:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\SmileyDB3\SmileyDB3.py", line 60, in get_types
cols.append(f'{k} {self.types[str(type(data[k]))]}')
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: "<class 'float'>"
Enter fullscreen mode Exit fullscreen mode

Uninstall the library

pip uninstall SmileyDB3

Install the latest version

pip install SmileyDB3

https://github.com/amr2018/SmileyDB3/issues/1

Top comments (0)