The bot is crashing when calling the method set_user_info() from db.py
Traceback (most recent call last):
File "./src/run.py", line 9, in <module>
init.init()
File "/home/karma-farm-reddit/src/init.py", line 63, in init
set_user_info()
File "/home/karma-farm-reddit/src/db.py", line 41, in set_user_info
db_config.upsert({"config": "user", "value": j}, Config.config == "user")
File "/home/karma-farm-reddit/venv/lib/python3.7/site-packages/tinydb/table.py", line 393, in upsert
updated_docs = self.update(document, cond)
File "/home/karma-farm-reddit/venv/lib/python3.7/site-packages/tinydb/table.py", line 358, in update
self._update_table(updater)
File "/home/karma-farm-reddit/venv/lib/python3.7/site-packages/tinydb/table.py", line 605, in _update_table
tables = self._storage.read()
File "/home/karma-farm-reddit/venv/lib/python3.7/site-packages/tinydb/storages.py", line 120, in read
return json.load(self._handle)
File "/usr/lib/python3.7/json/__init__.py", line 296, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.7/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 22397 (char 22396)
I think the error comes from me not being able to decode it can't decode the variable j, that is a dictionary.
It's expecting part of it to be enclosed in double quotes.
The dictionary j is all in single quotes, it looks like this.
The bot is crashing when calling the method set_user_info() from db.py
I think the error comes from me not being able to decode it can't decode the variable j, that is a dictionary. It's expecting part of it to be enclosed in double quotes. The dictionary j is all in single quotes, it looks like this.
What is causing that and how do I solve it? It is running on a Debian GNU/Linux 10 Release 10 server. I ran the bot using the run_linux.sh file.