Ask coding questions

← Back to all posts
Repl DB not able to store custom classes?
jaspp

Hi, I'm trying to save a class into the Repl DB, but I keep running into ValueError: Circular reference detected no matter what is in the class. Any ideas to make this work?

Voters
jaspp
Comments
hotnewtop
HayIsForHorses

Could you please specify where the error is?
I tried running the program and got this:

And if you already fixed it, please delete this post.

jaspp

@HayIsForHorses Hi, on line 239: db['players'] = test() I run into the error. I was first doing it with the "player" class, then I set up another class ("test") to troubleshoot and that also caused problems. Specifically, I get a 'ValueError: Circular reference detected". Thanks a lot for the help!

HayIsForHorses

@jaspp Hm, I've never tried storing a class to the repl db. So you're saying you want to call a function/class from the db?