Invalid Json error with datastore

Code:

local Players = game:GetService("Players")
local DataStoreService = game:GetService("DataStoreService")

local CardStore = DataStoreService:GetDataStore("PlayerCardListTEST")

local CardService = require(game.ReplicatedStorage.Modules.CardModule)
local MatchService = require(game.ReplicatedStorage.Modules.MatchService)
local CardCache = require(game.ServerStorage.Cache)


local function deepCopy(original)

	local copy = {}
	for k, v in pairs(original) do
		if type(v) == "table" then
			v = deepCopy(v)
		end
		copy[k] = v
	end
	return copy
end

local function playerAdded(player)
	print(player.Name)
	local success, data = pcall(function ()
		return CardStore:GetAsync(player.UserId)
	end)
	
	if success then
		if data then
			CardCache[player.UserId] = data

			local tempcache = deepCopy(CardCache[player.UserId])
			MatchService.TemporaryCache[player.UserId] = tempcache
		else
			CardCache[player.UserId] = CardService.DefaultCards

			local tempcache = deepCopy(CardCache[player.UserId])
			MatchService.TemporaryCache[player.UserId] = tempcache
		end

		print(MatchService.TemporaryCache[player.UserId] ,
			CardCache[player.UserId])
	else
		-- Handle case of error; kick, block saving, etc.
		warn(string.format("Could not load data for %s: %s", player.Name, data))
	end

end

game:BindToClose(function(player)
	CardStore:UpdateAsync(function(CurrentData)
		return CardCache[player.UserId]
	end)
	CardCache[player.UserId] = nil
end)

Players.PlayerAdded:Connect(playerAdded)

result:

  13:58:40.863  Layered Accessories JSON is invalid!  -  Studio

Which line of code is the error caused by?

No idea, it just displays as a warning from studio, i know it’s this script because it doesn’t happen if i disable it.
It is worth noting however that the playerAdded function doesn’t run.

Alright, after a bit of abusing the print function i discovered that this error came from a line in which i required a module, said module seemed to cause no errors, but upon calling pcall() on require i found that i get an “Attempt to call a table value” error.