본문 바로가기
반응형
반응형

프로그래밍/Python15

반응형
[Python] selenium으로 웹크롤링시 Message: element click intercepted 개발환경 - ubuntu18.04 - python3.7 1. Problem Message: element click intercepted selenium에서 버튼을 클릭하지 못해서 발생하는 에러 2. Solution .click() 대신에 button = driver.find_element(By.XPATH, "xpath") driver.execute_script("arguments[0].click();", button) 2023. 1. 25.
ModuleNotFoundError: No module named 'torchvision.models.mobilenetv2' 에러해결 개발환경 - ubuntu18.04 - python3.7 1. Problem model = torch.hub.load('pytorch/vision:v0.10.0', 'wide_resnet50_2', pretrained=True) wide_resnet을 학습시키려고 할 때 ModuleNotFoundError: No module named 'torchvision.models.mobilenetv2' 모듈을 찾을 수 없다는 error가 발생 2. Solution 정확한 이유는 알 수 없으나 stackoverflow의 해결방법은 pytorch/vision:v0.10.0 -> pytorch/vision:v0.8.0 2022. 4. 5.
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same 에러해결 개발환경 - ubuntu18.04 - python3.7 1. Problem RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same pytorch로 학습을 할 때 input type과 weight type이 같아야만 한다는 에러가 발생 2. Reason GPU로 학습을 할 때 model이나 dataset를 GPU에 설정하지 않았기 때문에 발생 3. Solution torch.tensor(..., device="cuda") torch.tensor(...).cuda() torch.tensor(...).to("cuda") model.to("cuda") dataset이나 model을.. 2022. 4. 5.
ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' 에러 해결 개발환경 - ubuntu18.04 - python3.7 1. Problem ImportError: cannot import name 'PILLOW_VERSION' from 'PIL' pillow를 설치했는데도 불구하고 import가 되지않는 error 발생 (9.0.1 버전이 설치 되어있었음) 2. Reason from PIL import Image, ImageOps, ImageEnhance, PILLOW_VERSION pillow의 버전이 너무 높아서 발생하는 문제 3. Solution pillow version = (1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 2.0.0,.. 2022. 3. 31.
반응형