1
2
|
from selenium import webdriver
driver = webdriver.Chrome("C:\Users\kimji\Desktop\python\chromedriver.exe")
|
cs |
위와 같이 셀레니움으로 투닥투닥하던 와중
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2
-3: truncated \UXXXXXXXX escape
라는 에러가 떴길래 바로 구글에게 물어봤다(구글은 신이다)
찾아볼 결과 파일의 경로를 불러올 때 \를 사용했고 그게 유니코드로 인식이 되었기 때문이다
아래의 방법으로 해결할 수 있다!
C:/Users/kimji/Desktop/python/chromedriver.exe
C:\\Users\\kimji\\Desktop\\python\\chromedriver.exe
'dev > error' 카테고리의 다른 글
ImproperlyConfigured (0) | 2022.03.20 |
---|---|
django.db.utils.IntegrityError: (1452, 'Cannot add or update a child row (0) | 2022.03.20 |
[git]fatal: The current branch feature/models has no upstream branch. (0) | 2022.03.07 |
Authentication plugin 'caching_sha2_password' cannot be loaded (0) | 2022.02.20 |
[python] AttributeError module 'requests' has no attribute 'get' (0) | 2022.01.05 |