Question:
I don’t have one. HELP ME FIX IT WHY NOT WORKING
Repl link:
https://replit.com/@Idkwhttph/Mining-Simulator#main.py
no code for now, its just the json db’s fault. When I fork it works, but this is the main one that I want to run my code on.
Um, what do you need help with?
1 Like
Traceback (most recent call last):
File "main.py", line 22, in <module>
create_backup()
File "/home/runner/Mining-Simulator/Backup_Json.py", line 6, in create_backup
backup_data = dict(db)
File "/home/runner/Mining-Simulator/venv/lib/python3.10/site-packages/replit/database/database.py", line 456, in __getitem__
val = json.loads(raw_val)
File "/nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I don’t get it?
Are you are trying to dump the entire Replit db into a JSON file for backup?
2 Likes
Not sure but dict(db) seems to contain an illegal character
How can we help you? What exactly are you trying to do and what do you need help with? provide the code, and the issue for better assistance.
1 Like