Hi guys, I’m creating a text-based adventure game in python and I’ve tried to use the replit database functions to store data for players using usernames and passwords to identify the save to load.
I’m using the username as a key to search through the database and select the correct record. However, when I try to save my player objects attributes (which includes other objects and their attributes) in a list, I get a ‘circular reference detected’ error.
I’ve searched my code to find the problem or where I’m importing incorrectly but can’t find it. The code is abit messy as I’m not the most clean programmer but any help would be appreciated, thanks.
I have actually come across this error before, and although I have not looked at the code, last time it was because I was trying to set a non json serializable object to the db. Probably because of poor design, the error given is completely unrelated.