[Python] inconsistent use of tabs and spaces in indentation / Unexpected indentation Pylance 오류

촨석·2023년 10월 11일
post-thumbnail

오늘도 열심히 공부하면서 Velog작성할 내용을 정리하던 도중...

오류를 발견하게 되었다!

❗️ 문제점

잘 모르겠지만 들여쓰기에서 오류가 난듯하다...😮‍💨

🔑 해결방법

Mac : command + shift + p
Window : Control + shift + p

들여쓰기를 공백으로 변환 (Convert Indentation to Spaces)


🔒 원인

Velog에서 작성한 코드를 복붙해서 VSCode로 옮겼는데

붙여놓는 도중 띄어쓰기(Space)와 탭(TAB)이 혼동되었던것 같다 🥲




📘Reference

https://stackoverflow.com/questions/52224313/unexpected-indentation-in-visual-studio-code-with-python

profile
바보가 되어브럿다 갱생불가

1개의 댓글

comment-user-thumbnail
2023년 10월 11일

우와 대단하세요!!!!!!

답글 달기