Skip to content

Instantly share code, notes, and snippets.

View samdev-7's full-sized avatar

Sam Liu samdev-7

View GitHub Profile
@samdev-7
samdev-7 / mongodb.py
Created December 9, 2021 23:13
db = MongoDB('CONNECTION_STRING', database='mydb', collection='mycollection') #Use as Python dictionary
from pymongo import MongoClient
class MongoDB():
def __init__(self, connectionString, database, collection):
self._client = MongoClient(connectionString)
self._db = self._client[database]
self._col = self._db[collection]
def __setitem__(self, key, value):
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.
Time: 22/02/21 3:02 PM
Description: Unexpected error
java.lang.IllegalArgumentException: Cannot use model data for a world other than the current client world
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122) ~[guava-21.0.jar:?] {}
at net.minecraftforge.client.model.ModelDataManager.cleanCaches(ModelDataManager.java:57) ~[?:?] {re:classloading}
at net.minecraftforge.client.model.ModelDataManager.requestModelDataRefresh(ModelDataManager.java:71) ~[?:?] {re:classloading}