인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

chcjswo's profile image
chcjswo

asked

Introduction to Python and Creating Various Automated Applications Using Web Crawling

How to use BeautifulSoup and Basic Web Parsing (2)

html 파일읽기 에러

Written on

·

429

0

강좌를 따라하는데 html파일 읽기를 실행하면 다음과 같은 에러가 발생합니다.

py파일과 html파일은 동일한 경로에 있습니다.

강좌와 같이 foot-list.html로 해도 똑같은 에러가 발생합니다.
어찌 해결 해야 되나요??

fp = open("food.html", encoding="utf-8") FileNotFoundError: [Errno 2] No such file or directory: 'food.html'

웹-크롤링python

Answer 3

0

chcjswo님의 프로필 이미지
chcjswo
Questioner

감사합니다~~

0

chcjswo님의 프로필 이미지
chcjswo
Questioner

감사합니다~~

0

niceman님의 프로필 이미지
niceman
Instructor

안녕하세요.

전민철님

No such file or directory: 아시겠지만, 파일을 못찾는 에러입니다.

'./food.html' 등으로 상대 경로를 표시해주거나, 안될 시에는 C:/경로/food.html 등으로 절대 경로로

사용하시면 문제가 해결 될 겁니다.

https://wikidocs.net/26

참고하시면 도움이 될겁니다.

감사합니다.

chcjswo's profile image
chcjswo

asked

Ask a question