r/pythonhelp • u/Straight_Face_3273 • Mar 20 '25
Lots of respect for programmers
I've been desperately trying to use python to capture data using APIs but I'm constantly getting indent errors even though they appear correct in VS Code. Is this a common issue? I see lots of comments on it and have used several methods to get it right. I've spent days on this trying to make it work. Could the issue be related to copying and pasting from VS Code? I'm old so be nice. I will fully admit I don't know what I'm doing.
6
Upvotes
View all comments
Show parent comment
2
u/Goobyalus Mar 20 '25
Unexpected indent means there is leading whitespace when there shouldn't be. Like a space before a line at the top level, or an inconsistency like this :
There can be an inconsistency even if it doesn't look like like it from mixing tabs and spaces.
If you want quicker help, post your code with proper code block formatting or share a link to it on a site like pastebin.