python-json-logger
python-json-logger copied to clipboard
"command" has not attribute "load"
I am making a Discord bot(which, I know is unrelated to this repository) and I'm using JSON. Whenever I try to run the commands using JSON, however, I keep getting the following error:
AttributeError: 'Command' object has no attribute 'load'
This was working just 2 days ago, and the next morning, it suddenly stopped. Here is a snippet of my code(I am using python 3.7.3):
gp = json.load(g)
user = "userid_" + str(userid)
if user not in gp:
addprofile(userid);
Sounds like an issue with your code, e.g. before the snippet you post you assign a value to json
(possibly in the local scope), which shadows the global module.
Because the error message plainly says that your json
local variable stores an object of type Command
which doesn't have a load
attribute.
Assuming AwesomeAg1234/blobgivingbot is the bot in question your issue also seems completely unrelated to this project, it's not even using python-json-logger.