Ich brauche für ein bestimmtes Programm eine Datenbank, wie anydbm, sie soll nur in einem Dictionary ein Dictionary speichern also so:
Code: Alles auswählen
>>> dicty=anydbm.open(os.getcwd()+"\\Data\\"+char+".db")
>>> dicty["testing"]={"hello":1,"hi":False}
Traceback (most recent call last):
File "<pyshell#103>", line 1, in <module>
[Zensiert]
File "...", line 53, in [Zensiert]
File "C:\Python\lib\bsddb\__init__.py", line 230, in __setitem__
_DeadlockWrap(wrapF) # self.db[key] = value
File "C:\Python\lib\bsddb\dbutils.py", line 62, in DeadlockWrap
return function(*_args, **_kwargs)
File "C:\Python\lib\bsddb\__init__.py", line 229, in wrapF
self.db[key] = value
TypeError: Data values must be of type string or None.
>>>
Danke
Robin