inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

적용 학습

해결됨

일잘하는 마케터, MD에게 꼭 필요한 파이썬 데이터 분석

안녕하세요 리뷰 크롤링 하는 과정에서 다른 페이지에 적용 학습해보다가 에러코드가 떠서 질문드립니다. name = ['언더아머 CGI 다운'] ns_address = 'https://search.shopping.naver.com/search/all?query=cgi%20%EB%8B%A4%EC%9A%B4&frm=NVSHATC&prevQuery=%EB%89%B4%EB%B0%9C%EB%9E%80%EC%8A%A4%EB%B0%94%EB%9E%8C%EB%A7%89%EC%9D%B4' shoppingmall_review = "/html/body/div/div/div[2]/div[2]/div[2]/div[3]/div[1]/ul/li[3]/a" category_total = "/html/body/div/div/div[2]/div[2]/div[2]/div[3]/div[7]/div[2]/div[2]/ul/li[1]/a" 순서대로 위와 같이 적용 완료하였는데요, 그 다음에 소스코드 주신 부분인 아래 부분을 적용하니까 다음과 같은 에러가 뜹니다. 확인 부탁드려도 될까요? header = {'User-Agent': ''} driver.implicitly_wait(3) driver.get(ns_address) req = requests.get(ns_address,verify=False) html = req.text soup = BeautifulSoup(html, "html.parser") sleep(2) element=driver.find_element_by_xpath(shoppingmall_review) driver.execute_script("arguments[0].click();", element) sleep(2)' 에러 - /usr/local/lib/python3.7/dist-packages/urllib3/connectionpool.py:847: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings InsecureRequestWarning) --------------------------------------------------------------------------- NoSuchElementException Traceback (most recent call last) <ipython-input-30-8a5c5adbf17a> in <module> 6 soup = BeautifulSoup(html, "html.parser") 7 sleep(2) ----> 8 element=driver.find_element_by_xpath(shoppingmall_review) 9 driver.execute_script("arguments[0].click();", element) 10 sleep(2) 3 frames /usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py in find_element_by_xpath(self, xpath) 392 element = driver.find_element_by_xpath('//div/td[1]') 393 """ --> 394 return self.find_element(by=By.XPATH, value=xpath) 395 396 def find_elements_by_xpath(self, xpath): /usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py in find_element(self, by, value) 976 return self.execute(Command.FIND_ELEMENT, { 977 'using': by, --> 978 'value': value})['value'] 979 980 def find_elements(self, by=By.ID, value=None): /usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params) 319 response = self.command_executor.execute(driver_command, params) 320 if response: --> 321 self.error_handler.check_response(response) 322 response['value'] = self._unwrap_value( 323 response.get('value', None)) /usr/local/lib/python3.7/dist-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response) 240 alert_text = value['alert'].get('text') 241 raise exception_class(message, screen, stacktrace, alert_text) --> 242 raise exception_class(message, screen, stacktrace) 243 244 def _value_or_default(self, obj, key, default): NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"/html/body/div/div/div[2]/div[2]/div[2]/div[3]/div[1]/ul/li[3]/a"} (Session info: headless chrome=105.0.5195.102) 그리고 다음 url과 같이 나타낼 페이지가 그리 많지 않은 경우에도 같은 소스코드 양식을 사용해도 될까요? https://search.shopping.naver.com/catalog/29274895216?query=cgi%20%EB%8B%A4%EC%9A%B4&NaPm=ct%3Dl8qn5dbs%7Cci%3Dcc97712ba6dec8be52ea670a2e607bb755d59f4f%7Ctr%3Dslsl%7Csn%3D95694%7Chk%3D97fd029ce7fc81750ad0a1d2110ad155b54fe09d 감사합니다.

  • python
  • 웹-크롤링
GGGG 댓글 1 좋아요 0 조회수 1065

버퍼 강의 중 VWorld StateTile 레이어

해결됨

QGIS 파이썬 자동화 (벡터편) Ver.2

버퍼 강의 중 VWorld StateTile 레이어 추가를 어떻게 하나요???

  • GIS
  • QGIS
  • python
backboss 댓글 1 좋아요 2 조회수 476

ansible-server docker 시작시 iptables 오류문의

미해결

Jenkins를 이용한 CI/CD Pipeline 구축

host : window #dockerd -D 아래에 iptables 부분에서 오류가 발생합니다. DEBU[2022-09-30T02:15:43.416028911Z] Cleaning up old mountid : start. INFO[2022-09-30T02:15:43.416212616Z] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby DEBU[2022-09-30T02:15:43.416278772Z] Cleaning up old mountid : done. failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables --wait -t nat -N DOCKER: iptables v1.8.4 (nf_tables): CHAIN_ADD failed (No such file or directory): chain PREROUTING (exit status 4) 해결 방법이 있을까요?

  • docker
  • ansible
  • iptables
  • jenkins
  • kubernetes
  • sonarqube
  • cicd
lanovia 댓글 2 좋아요 1 조회수 2829

StandardScaler변환 후 log변환

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

24:04 코드에서 왜곡된 분포 정도를 낮추기 위해 log변환으로 스케일링을 하였는데 StandardScaler로 한번 더 변환을 하는것이 의미가 있는지 궁금합니다 이유가 무엇인가요?

  • 통계
  • 머신러닝 배워볼래요?
  • python
예찬 댓글 1 좋아요 1 조회수 571

cookie-parser Invalid or unexpected token error

미해결

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

영상에 따라서 단순하게 cookie-parser 설치하고 import cookie-parser 한다음에 app.use(cookieParser()) 진행하면 상단에 이미지처럼 에러가 발생하더라구요. cookie-parser을 제거하면 cookie가 정상적으로 저장되는 것을 볼 수 있었습니다. 어떤 부분을 놓친 것일까요 server.ts import express from "express"; import morgan from "morgan"; import { AppDataSource } from "./data-source" import authRoutes from "./routes/auth"; import subRoutes from "./routes/subs"; import cors from 'cors'; import dotenv from 'dotenv'; import cookieParser from "cookie-parser"; const app = express(); dotenv.config(); app.use(cors({ origin: process.env.ORIGIN, credentials: true })) app.use(express.json()); app.use(morgan('dev')); app.use(cookieParser()) app.get("/", (_, res) => res.send("running")); app.use('/api/auth', authRoutes); app.use("/api/subs", subRoutes); const PORT = process.env.PORT; console.log('PORT', PORT) app.listen(PORT, async () => { console.log(`server running at http://localhost:${PORT}`); AppDataSource.initialize().then(async () => { console.log("data initialize...") }).catch(error => console.log(error)) })

  • react
  • nodejs
  • typescript
  • postgresql
  • docker
  • 클론코딩
  • Next.js
박준희 댓글 0 좋아요 0 조회수 262

YOLO v1 바운딩 박스 관련

미해결

[개정판] 딥러닝 컴퓨터 비전 완벽 가이드

안녕하세요! YOLO v1의 이해 - 01에서 바운딩 박스가 셀마다 2개식 생성이 되는데 이때 셀마다 갖는 바운딩 박스의 크기나 모양 등이 동일한 것인가요? 아니면 랜덤하게 생성이 되는것인가요? 감사합니다~

  • 컴퓨터-비전
  • tensorflow
  • keras
  • python
  • 딥러닝
  • 머신러닝 배워볼래요?
축구쟁이 댓글 1 좋아요 0 조회수 379

nginx 오늘 기준 nginx=1.18.0-0ubuntu1.3 입니다..

미해결

풀스택을 위한 도커와 최신 서버 기술(리눅스, nginx, AWS, HTTPS, 배포까지) [풀스택 Part3]

버전 호환에 문제가 없는진 모르겠지만요...

  • linux
  • network
  • docker
withkey 댓글 4 좋아요 0 조회수 588

스케일링 1 강의 질문

미해결

[개정판] 파이썬 머신러닝 완벽 가이드

데이터 전처리 - 스케일링 - 01 강의 1분47초에서 표준화로 데이터의 피처 각각이 평균이 0 이고 분산이 1인 가우시안 정규분포로 바꿔준다고 했는데요. 원래 데이터가 정규분포를 가졌다면 xi_new (표준화 식)식 으로 평균이 0 이고 분산이 1인 정규분포를 도출할 수 있지만 애초에 정규분포를 이루지 않는 데이터의 경우 는 해당 식을 적용한다고 해서 정규분포가 되지 않을 텐데 이런 경우는 어떻게 해서 정규분포로 만든다는 것일까요? 답변 부탁드립니다. 감사합니다.

  • python
  • 머신러닝 배워볼래요?
  • 통계
허쿡 댓글 1 좋아요 0 조회수 294

data 폴더 생성되지 않음

미해결

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

안녕하세요, data 폴더 안에 파일들이 생기지 않아 질문 드립니다. 강의와 같이 docker-compose.yml 파일에 코드 postgressql 오타난거 postgresql로 제대로 수정하고, 에디터 껐다 킨 다음에 docker-compose up 명령어 실행해봤는데도 data에 폴더들이 생성이 안됩니다. 생성이 안되서 빈 data 폴더를 아예 지우고 docker-compose.yml 파일도 다시 지웠다가 재작성 했는데도 생기질 않습니다. 제가 백엔드가 처음이라 어떻게 해야 할 지 모르겠습니다.. 제가 놓치고 있는 부분이 있는걸까요?

  • docker
  • Next.js
  • 클론코딩
  • docker
  • react
  • typescript
  • nodejs
  • postgresql
AIN 댓글 2 좋아요 0 조회수 729

yolo v5 labelimg 사진추가 오류

미해결

yolov5에서 labelimg를 사용하는데 labelimg로 라벨링 작업을 한 후, 새로운 이미지들이 생겨 이전에 라벨링 작업을 했던 이미지 폴더에 새로운 이미지들을 추가하여 라벨링 작업을 이어서 했더니, 전에 작업했던 라벨링들이 다 지워지는 현상이 발생했습니다. labelimg를 사용하여 전에 라벨링 작업했던 것과 새로 라벨링 작업한 것을 합쳐도 이런 현상이 발생하는데, labelimg에서 새로운 이미지를 추가하려면 모든 이미지들을 처음부터 라벨링 다시 해야 하나요? 아니면 해결방법이 있을까요?

  • 욜로
  • yolov5
  • labelimg
  • 라벨링
  • labeling
  • 인공지능
  • 파이썬
  • python
  • 욜로v5
wnsgur0473 댓글 0 좋아요 0 조회수 476

레티나 디스플레이 관련 질문

미해결

공공데이터로 파이썬 데이터 분석 시작하기

윈도우에서는 레티나 디스플레이 코드로 설정을 해도 표에서 달라진게 없는거같은데 혹시 맥 전용 기능인가요..?

  • numpy
  • python
  • pandas
연합시스템 dev 계정 댓글 1 좋아요 0 조회수 300

워드클라우드 실행 오류

미해결

공공데이터로 파이썬 데이터 분석 시작하기

이와같은 오류메시지로 실행이 안되는데 해결책 알수 있을까요 선생님 ㅜ

  • numpy
  • python
  • pandas
능함가 댓글 1 좋아요 0 조회수 453

비쥬얼 스튜디오 2017은 어서 다운받나요??

미해결

파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)

비쥬얼 스튜디오 2017은 어서 다운받나요?? 현재버젼은 좀 다른점이 있어 k번쨰 출력 셋팅부분에서 나아가질 못하네요

  • python
  • 코테 준비 같이 해요!
이우연 댓글 2 좋아요 0 조회수 2694

[재질문] 왜 num은 int로 바꾼 후에 다시 str() 로 바꿔줘야 하나요 ?

미해결

파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)

입력 받을 때 부터 num은 str으로 받고, m은 int 로 바꿀 수는 없는 걸까요? -- 어떻게 하면 num은 str으로 받고, m은 int로 받을 수 있을까요?

  • python
  • 코테 준비 같이 해요!
댓글 1 좋아요 0 조회수 206

[2/5] plotly express 를 통한 일별 시세 시각화

미해결

파이썬 증권 데이터 수집과 분석으로 신호와 소음 찾기

plotly express 예제 중 질문입니다. 1. 우분투 버전 (base) root@gd-virtual-machine:~# cat /etc/issue Ubuntu 20.04.4 LTS \n \l 2. 파이썬 버전 (base) root@gd-virtual-machine:~# python --version Python 3.9.7 3. 공부하는 부분 [2/5] plotly express를 통한 일별 시세 시각화 px.line 을 처음에 실행하면 그래프가 나옵니다. 그러나, 저장된 파일로 실행하면 그래프가 안 나옵니다. 이런 경우도 보셨나요? 4. 해당 소스 import plotly.express as px import pandas as pd df = px.data .stocks() df px.line(df, x="date", y="GOOG") 처음 실행은 정상적으로 그래프가 나옴 저장된 파일로 실행하면 비정상적으로 그래프가 나오지 않음

  • pandas
  • 웹-크롤링
  • numpy
  • python
  • seaborn
  • plotly
  • 웹 스크래핑
  • matplotlib
amethis 댓글 1 좋아요 1 조회수 692

ec2 에 배포시 500 (Internal Server Error) 에러가 뜹니다.

미해결

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

안녕하세요? 강의를 무사히 다듣고 따라 했는데 로컬에서는 문제가 없다가 .env파일과 next.config, 하드코딩된 url 주소를 다 바꿔주었는데도 ec2 환경에서 에러가 뜹니다.

  • react
  • nodejs
  • docker
  • typescript
  • postgresql
  • Next.js
  • 클론코딩
댓글 1 좋아요 0 조회수 1412

로그인을 안한 상태에서 에러질문 드립니다(재작성)

해결됨

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

로그인을 하지않은 상태에서는 loadUser함수에 의해 /auth/me로 router로 호출이 되어 user미들웨어는 담긴 쿠키가 없으니 next()로 넘어서 auth미들웨어에서 unauthenticated 에러가 뜹니다 로그인을 안한 상태라고 401 에러가뜨는게 맞는건지.. 강의대로 재대로 따라했는지 잘 모르겠어서 질문드립니다 제공된 소스코드랑 비교해도 다른점을 모르겠네요 로그인만 하면 에러는 당연히 안뜨네요

  • docker
  • nodejs
  • react
  • typescript
  • postgresql
  • 클론코딩
  • Next.js
댓글 1 좋아요 0 조회수 371

Visual Code로 실행하고 싶습니다.

해결됨

일잘하는 마케터, MD에게 꼭 필요한 파이썬 데이터 분석

기존에 사용하던게 Visual code여서 이거 하나로만 사용하고 싶어서 코드로 복사하여 사용하고 관련 라이브러리를 설치하고 실행했는데 오류가 발생해서요. 혹시 Visual code에서도 실행할 수 있는 방법이 있을까요?? C:\StartCode>C:/Users/dantr/AppData/Local/Microsoft/WindowsApps/python3.10.exe c:/StartCode/교육/test1.py c:\StartCode\교육\test1.py:21: DeprecationWarning: use options instead of chrome_options driver = webdriver.Chrome ('chromedriver', chrome_options=chrome_options) Traceback (most recent call last): File "C:\Users\dantr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\common\service.py", line 72, in start self.process = subprocess.Popen(cmd, env=self.env, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 969, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2032.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 1438, in execute child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] 지정된 파일을 찾을 수 없습니다 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\StartCode\교육\test1.py", line 21, in <module> driver = webdriver.Chrome ('chromedriver', chrome_options=chrome_options) File "C:\Users\dantr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init self.service.start() File "C:\Users\dantr\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\selenium\webdriver\common\service.py", line 81, in start raise WebDriverException( selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

  • python
  • 웹-크롤링
펀펀한칼퇴리 댓글 2 좋아요 0 조회수 283

이메일 아이디는 findOneBy를 이용하였는데 서브레딧제목은 왜 QueryBuilder를 사용하나요?

해결됨

따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)

const emailUser = await User.findOneBy({ email }); const usernameUser = await User.findOneBy({ username }); if (emailUser) errors.email = '이미 사용 중인 이메일입니다.'; if (usernameUser) errors.username = '이미 사용 중인 이름입니다.'; if (Object.keys(errors).length > 0) { return res.status(400).json(errors); } 이런방식과 QueryBuilder는 뭐가 다른지 왜 그렇게 하는지 궁금합니다.. 연휴에도 질문드려 송구하네요..에고 ^^

  • postgresql
  • docker
  • typescript
  • nodejs
  • react
  • Next.js
  • 클론코딩
댓글 1 좋아요 1 조회수 482

인기 태그

인프런 TOP Writers

주간 인기글