Thanks a ton man!! Also, very nice that you left the error in there and debugged it in front of us. As a beginner, that's really great to see.
@ChestboyMC4 жыл бұрын
I am not making a website, but thanks for teaching me how to read out of json files.
@erwinn583 жыл бұрын
I followed your code but i constantly get a "KeyError: 'main'" error..
@erwinn583 жыл бұрын
FIXED
@FleeXLP3 жыл бұрын
@@erwinn58 how?
@pearcerhead19874 жыл бұрын
I am getting a key error: 'main' when I try and run my code. My JSON format is similar and the call for the key 'main' should work to pull out the value 'temp' but I keep getting that "Key Error"
@willlennox69732 жыл бұрын
Its been a yead, but just in case 'temp' is not in 'main' so ['weather']['temp'] will work
@ftnsco4 жыл бұрын
I am not a big fan of using underscores as oppose to camelCase. It makes the code look busy. It looks like objective C 😁 Any reason why you choose underscores? Would like to know.
@TheCodex4 жыл бұрын
Hey Eri! Yeah good point - I was trying to improve the readability of longer variable names. I think the general use case in Python should be snake_case: stackoverflow.com/questions/8908760/should-i-use-camel-case-or-underscores-in-python
@ftnsco4 жыл бұрын
Ahh I see, I think that makes sense, I’m not familiar with python to be honest, but in Java script i think camelCase is more familiar. Thanks for the tutorials.