lin 디버깅에 대한 확장자가 없습니다.
해결됨
[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)
왼쪽 파일 편집기 쪽에 파란창으로 되지도 않고 import쪽에 컬러도 먹지 않습니다. 그래서 그런지 실행이 되지 않습니다.
- python
- 웹-크롤링
172만명의 커뮤니티!! 함께 토론해봐요.
해결됨
[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)
왼쪽 파일 편집기 쪽에 파란창으로 되지도 않고 import쪽에 컬러도 먹지 않습니다. 그래서 그런지 실행이 되지 않습니다.
미해결
파이썬 알고리즘 문제풀이 입문(코딩테스트 대비)
채점 시 아래와 같은 오류가 발생합니다. (Judge(Python).exe) 처리되지 않은 예외: System.NullReferenceException: 개체 참조가 개체의 인스턴스로 설정되지 않았습니다. 위치: Judge.Program.Main(String[] args) 어떻게 하면 저의 답을 쉽게 채점할 수 있나요?
미해결
%%bash # drive.mount("/content/drive") apt-get update apt-get install g++ openjdk-8-jdk python-dev python3-dev pip3 install JPype1 pip3 install konlpy %% bash 에서 막히네요 오류는 제목 그대로 뜹니다 현재 git bash가 설치되어 있는 상황인데 연관이 있을까요?
해결됨
공공데이터로 파이썬 데이터 분석 시작하기
안녕하세요. Chapter 2 12-1 Folium 사용예제 에서 외부링크 클릭 시 * 예제목록 : http://nbviewer.jupyter.org/github/python-visualization/folium/tree/master/examples/ * Quickstart : https://nbviewer.jupyter.org/github/python-visualization/folium/blob/master/examples/Quickstart.ipynb 위와 같이 되어 있는데 접속시 404 에러가 뜹니다. 아래 링크로 변경된 듯 한데 확인 부탁 드립니다. 예제목록 : https://nbviewer.org/github/python-visualization/folium/tree/main/examples/ QuickStart : https://nbviewer.org/github/python-visualization/folium/blob/main/examples/Quickstart.ipynb 감사합니다.
해결됨
시스템엔지니어가 알려주는 리눅스 기초편 Bash Shell Script
bash와 zsh이 어느 정도의 차이가 나고, 학습해야 할 분량이 어느 정도 되는지 궁금합니다. ------------------ 강의에서는 zsh이 언급이 되어있지 않았지만 Mac OS나 다른 고급 사용자들은 zsh도 같이 사용한다는 자료를 보았습니다. ( 강의 화면 맨 위에도 zsh이라는 문구가 있네요. ) 제가 알아본 바로는 부모가 같은 '셸'이기에 둘이 매우 유사하다고는 하는데 학습자 입장에서는 얼마나 차이가 나고, 실무에서 얼만큼 사용되는지 가늠이 안되네요. bash 사용만 숙달 시킨다면 zsh은 유사도가 크기 때문에 따로 크게 시간을 투자해서 공부할 필요가 없다고 생각하면 되나요? ( 만약 잘못된 점이 있다면 피드백 부탁드립니다. 감사합니다. )
해결됨
시스템엔지니어가 알려주는 리눅스 기초편 Bash Shell Script
웹 리눅스 환경(JSLinux, codeonweb)으로만 진행해야 하나요? 여차저차 유튜브 영상 보면서 WSL로 우분투 설치를 한 상태인데 둘이 크게 다른지 궁금하여 물어봅니다... ( 일단, WSL으로 구동한 상태로 강의 수강 진행하다가 문제가 생기면 바꿔 보겠습니다. )
해결됨
파이썬 동시성 프로그래밍 : 데이터 수집부터 웹 개발까지 (feat. FastAPI, async, await)
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 강사님 안녕하세요~! 6번째 챕터 FastAPI로 웹크롤링하는 것을 잘 보고 있습니다!! 궁금한 점이 VS Code로 강의를 진행하셨는데, 혹시 파이참으로도 구동이 가능한가요..? 답변 꼭 부탁드리겠습니다~!^^
미해결
모두를 위한 파이썬 : 필수 문법 배우기 Feat. 오픈소스 패키지 배포 (Inflearn Original)
# Ex3 c = 40 def foobar(): # c = c + 10 # UnboundLocalError # c = 10 # c += 100 print('Ex3 > ', c) foobar() 여기서 c = 10은 값 수정이 아닌 값 할당으로 내부에서 10 그대로 출력하기 때문에 문제없지않나요??
미해결
cmd에서 파이썬 관련 명령어 입력시 python이라는 문구만 출력되고 실행이 되지않습니다. 왜이러는건가요??
미해결
[신규 개정판] 이것이 진짜 크롤링이다 - 기본편
현재 m1맥북 사용중인데 csv 파일로 저장할경우 셀 한칸에 한글자씩 입력이되고 데이터가 neme, price, link 가 아닌 name price link name price link 이렇게 아래로 데이터가 저장됩니다. 어떻게 해야할까요?
미해결
[개정판] 파이썬 머신러닝 완벽 가이드
https://www.inflearn.com/questions/499562 이 글에 저만 빼고 답변해주시는데 이유가 뭘까요.
미해결
[개정판] 딥러닝 컴퓨터 비전 완벽 가이드
안녕하세요. 먼저 기본적인 질문 드리는 것 같아서 죄송합니다.. 6:39에서 40x50x512 와 1x1x9이 연산핸서 어떻게 40x50x9가 나오는건가요? 채널이 어떻게 줄었는지 이해가 안갑니다.. 미리 감사드립니다.
미해결
파이썬 무료 강의 (기본편) - 6시간 뒤면 나도 개발자
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 파일입출력 영상 코드대로 썼는데 계속 오류가 떠요 다른 질문에 답변하신거 보니까 버전이 달라서 그렇다고 하셨는데 제거는 최신버전이거든요... 3.몇이상 인데 만약에 버전이 다른거면 뭐라고 입력해야 하나요
미해결
파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트
안녕하세요? 1.이전에는 됐는데, 왜 다시할때는 안되는건지 모르겠네요 ㅠㅠ 11분경에 보내시는 메일이 발송이 되지 않습니다. 다음과 같이 1이 출력되면 메일이 발송성공한 것으로 알고 있는데, 기다려 보아도 메일이 오지를 않네요 강의 후반부에 회원가입과 동시에 메일을 보내는 부분도 메일이 발송되지가 않습니다 ㅠㅠ 2. 14분경에 views.py에서 signup함수 내부에 form.save()를 signed_user = form.save()로 바꿔주시는데, form.save()라는 함수가 값들을 실질적으로 db에 저장하는 것으로 알고 잇습니다. 그러면 signed_user = form.save()로 받아주는 부분은 해당 데이터를 db에 저장하는 동시에 저장된 그 유저 인스턴스(데이터 한행)를 변수에 담는 것인가요? 좋은 강의 감사합니다
미해결
작정하고 장고! Django로 Pinterest 따라만들기 : 바닥부터 배포까지
run-edit configurations 왼쪽 상단+ 눌러서 python 체크- 스크립트 패스 프래그매틱 -venv-scripts 파라미터 runserver 한다음 매니지파이 우클릭 디버깅(무당벌레) 누르면 원래 python manage.py runserver 한것처럼 127:0:0:1:8000 이런거 터미널 창에 안뜨는데. 사이트는 들어가지긴 해요 여기서 빈칸에 test 입력한다음 post 누르면 3:34초 처럼 디버그 창에 아무것도 안뜨네요 ㅠㅠ 그리고 디버깅 실행 눌르면 무담벌레 점 잠깐 찍혔다가 사라지네요
미해결
제가 작성한 코드는 아닙니다 크롤링 하는 와중에 list index of range 에러가 나오는데 해결법을 못 찾아서 질문드립니다.. from urllib.request import urlopen from bs4 import BeautifulSoup from xml.dom.pulldom import END_DOCUMENT import pandas as pd import requests from bs4 import BeautifulSoup from datetime import datetime import re from tqdm import tqdm from tqdm.contrib.concurrent import process_map import math from time import sleep from multiprocessing.dummy import Pool import multiprocessing as mp from multiprocessing.pool import MaybeEncodingError start_date = "y1=2019&m1=09&d1=25" end_date = "y2=2019&m2=09&d2=30" url = "https://find.mk.co.kr/new/search.php?pageNum={}&cat=&cat1=&media_eco=&pageSize=10&sub=all&dispFlag=OFF&page=news&s_kwd=%BB%EF%BC%BA%C0%FC%C0%DA&s_page=news&go_page=&ord=1&ord1=1&ord2=0&s_keyword=%BB%EF%BC%BA%C0%FC%C0%DA&period=p_direct&s_i_keyword=%BB%EF%BC%BA%C0%FC%C0%DA&s_author=&{}&{}&ord=1&area=ttbd" def get_list(idx) : #idx = 검색했을때 page 번호 req = requests.get(url.format(idx, start_date, end_date)) #한글깨져서 인코딩 soup = BeautifulSoup(req.content.decode('euc-kr','replace'), 'html.parser') div_list = soup.find_all('div', {'class' : 'sub_list'}) art_list = [i.find('span', {'class': 'art_tit'}) for i in div_list] #db에 저장할거 title, href, body, date df = pd.DataFrame(columns = {'title','href', 'date','body'}) for article in art_list: append_flag = True title = str(article.find("a").contents[0]) href = str(article.find("a")["href"]) body_text = None date = None try: req = requests.get(href, timeout=2) except requests.exceptions.Timeout as errd: print("Timeout Error : ", errd) except requests.exceptions.ConnectionError as errc: print("Error Connecting : ", errc) except requests.exceptions.HTTPError as errb: print("Http Error : ", errb) # Any Error except upper exception except requests.exceptions.RequestException as erra: print("AnyException : ", erra) try: soup = BeautifulSoup(req.content.decode('euc-kr','replace'), 'html.parser') except: print("parser error") date_text = soup.find('li', {'class' : 'lasttime'}) if not date_text : date_text = soup.find('li', {'class' : 'lasttime1'}) if date_text : match = re.search(r'\d{4}.\d{2}.\d{2}', date_text.string) if match : date = datetime.strptime(match.group(), '%Y.%m.%d').date() else : print("match none") else : append_flag = False #print("mssing date text") art_text = soup.find('div', {'class' : 'art_txt'}) if not art_text : art_text = soup.find('div', {'class' : 'article_body'}) if not art_text : art_text = soup.find('div', {'class' : 'view_txt'}) if art_text : body_text = art_text.get_text() else : append_flag = False #print("mssing body text") #print("link : " + href) if append_flag : temp = pd.DataFrame({'title' : [ title ], 'href' : [ href ], 'date' : [ date ], 'body' : [body_text]}) df = df.append(temp) return df def get_count() : req = requests.get(url.format(1, start_date, end_date)) #한글깨져서 인코딩 soup = BeautifulSoup(req.content.decode('euc-kr','replace'), 'html.parser') count_text = soup.find('span', {'class' : 'class_tit'}).get_text().replace(",","") art_count = re.search("\d+",count_text) "y1=2019&m1=03&d1=15" print(start_date[3:7]+"년 "+start_date[11:13]+"월 "+start_date[17:]+"일 부터 " +end_date[3:7]+"년 "+end_date[11:13]+"월 "+end_date[17:]+"일 까지 총 " +art_count.group(0)+"개의 기사") return art_count.group(0) if __name__ == "__main__": count = get_count() tasks_count = math.ceil(float(count)/20) + 1 #tasks = range(1,10) tasks = range(1,tasks_count) result_list = process_map(get_list, tasks,max_workers=4) df = pd.concat(result_list) #df = pd.concat(parmap.map(get_list, tasks, pm_pbar = True, pm_processes = 4)) print(df) file_name = start_date[5:7]+start_date[11:13]+start_date[17:]+"_"+end_date[5:7]+end_date[11:13]+end_date[17:] df.to_csv(file_name+'.csv', index = False, encoding='utf-8-sig') ------------------------------------------------------------------------------------------------------------------------------------------------------ 코드는 이렇구요 _RemoteTraceback Traceback (most recent call last) _RemoteTraceback : """ Traceback (most recent call last): File "/home/ubuntu/anaconda3/envs/python3/lib/python3.6/concurrent/futures/process.py", line 175, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) File "/home/ubuntu/anaconda3/envs/python3/lib/python3.6/concurrent/futures/process.py", line 153, in _process_chunk return [fn(*args) for args in chunk] File "/home/ubuntu/anaconda3/envs/python3/lib/python3.6/concurrent/futures/process.py", line 153, in <listcomp> return [fn(*args) for args in chunk] File "<ipython-input-7-167ab35f9166>", line 22, in get_list title = str(article.find("a").contents[0]) IndexError: list index out of range """ The above exception was the direct cause of the following exception: IndexError Traceback (most recent call last) <ipython-input-7-167ab35f9166> in <module> () 96 #tasks = range(1,10) 97 tasks = range ( 1 , tasks_count ) ---> 98 result_list = process_map ( get_list , tasks , max_workers = 4 ) 99 df = pd . concat ( result_list ) 100 #df = pd.concat(parmap.map(get_list, tasks, pm_pbar = True, pm_processes = 4)) /home/ubuntu/anaconda3/envs/python3/lib/python3.6/site-packages/tqdm/contrib/concurrent.py in process_map (fn, *iterables, **tqdm_kwargs) 128 tqdm_kwargs = tqdm_kwargs . copy ( ) 129 tqdm_kwargs [ "lock_name" ] = "mp_lock" --> 130 return _executor_map ( ProcessPoolExecutor , fn , * iterables , ** tqdm_kwargs ) /home/ubuntu/anaconda3/envs/python3/lib/python3.6/site-packages/tqdm/contrib/concurrent.py in _executor_map (PoolExecutor, fn, *iterables, **tqdm_kwargs) 74 map_args . update ( chunksize = chunksize ) 75 with PoolExecutor ( ** pool_kwargs ) as ex : ---> 76 return list ( tqdm_class ( ex . map ( fn , * iterables , ** map_args ) , ** kwargs ) ) 77 78 /home/ubuntu/anaconda3/envs/python3/lib/python3.6/site-packages/tqdm/notebook.py in __iter__ (self) 255 def __iter__ ( self ) : 256 try : --> 257 for obj in super ( tqdm_notebook , self ) . __iter__ ( ) : 258 # return super(tqdm...) will not catch exception 259 yield obj /home/ubuntu/anaconda3/envs/python3/lib/python3.6/site-packages/tqdm/std.py in __iter__ (self) 1183 1184 try : -> 1185 for obj in iterable : 1186 yield obj 1187 # Update and possibly print the progressbar. /home/ubuntu/anaconda3/envs/python3/lib/python3.6/concurrent/futures/process.py in _chain_from_iterable_of_lists (iterable) 364 careful not to keep references to yielded objects . 365 """ --> 366 for element in iterable : 367 element . reverse ( ) 368 while element : /home/ubuntu/anaconda3/envs/python3/lib/python3.6/concurrent/futures/_base.py in result_iterator () 584 # Careful not to keep a reference to the popped future 585 if timeout is None : --> 586 yield fs . pop ( ) . result ( ) 587 else : 588 yield fs . pop ( ) . result ( end_time - time . monotonic ( ) ) /home/ubuntu/anaconda3/envs/python3/lib/python3.6/concurrent/futures/_base.py in result (self, timeout) 430 raise CancelledError ( ) 431 elif self . _state == FINISHED : --> 432 return self . __get_result ( ) 433 else : 434 raise TimeoutError ( ) /home/ubuntu/anaconda3/envs/python3/lib/python3.6/concurrent/futures/_base.py in __get_result (self) 382 def __get_result ( self ) : 383 if self . _exception : --> 384 raise self . _exception 385 else : 386 return self . _result --------------------------------------------------------------------------------------------------------------------- 이렇게 에러가 뜹니다 title = str(article.find("a").contents[0]) 이 부분에서 contents가 존재하지 않는데 인덱스로 접근하려고 해서 오류가 난 것 같은데 contents가 무조건 존재 하는게 아니라면 존재하지 않는 경우의 예외처리를 추가하려면 어떻게 해야될까요? 어느 위치에 뭐라고 작성해야 할지 몰라서 막막해서 질문드립니다
미해결
[신규 개정판] 이것이 진짜 크롤링이다 - 기본편
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. import requests from bs4 import BeautifulSoup import openpyxl fpath = r'C:\Users\Lenovo\Desktop\content\참가자_data.xlsx' wb = openpyxl.load_workbook(fpath) ws=wb.active #현재 활성화된 시트 선택 codes = ["000660","035720","005930"] row=2 for code in codes: url=f"https://finance.naver.com/item/sise.naver?code={code}" response = requests.get(url) html=response.text soup=BeautifulSoup(html,'html.parser') price=soup.select_one("#_nowVal").text price=price.replace(',','') print(price) ws=[f'B{row}']=int(price) row=row+1 wb.save(fpath) cannot assign to f-string expression 이런 에러가 뜨면서 작동이 안됩니다 ㅜㅜ
미해결
[신규 개정판] 이것이 진짜 크롤링이다 - 기본편
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요 강의 잘 듣고있습니다 다름이 아니라 엑셀부분을 코드 짜고 실행하면 엑셀 파일은 만들어지는데 안에 데이터셀이 텅 비어있습니다...ㅠㅠ
미해결
프로그래밍 시작하기 : 파이썬 입문 (Inflearn Original)
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. def nested_func(num): #1 def func_in_func(num): #2 print(num) #3 print("In func") #4 func_in_func(num + 100) #5 nested_func(100) #6 수업 중 중첩함수에 관한 내용에서 #6를 먼저 받고 #1로 돌아가 num에 100이 입력된다는 것은 이해했습니다. 그런데 그다음에 #2로 가서 num에 100이 입력되지 않고 바로#4로 간다는 부분이 잘 와닿지 않습니다. 왜그렇게 되는건가요?
미해결
[파이토치] 실전 인공지능으로 이어지는 딥러닝 - 기초부터 논문 구현까지
안녕하세요 호형님의 강의를 기본베이스로 듣고, 인터넷에서 이것저것 보면서 1D CNN을 제가 가진 데이터셋 분류에 적용하고있는 학생입니다. CustomDataSet을 만들고 DataLoader구현 후, 훈련과 검증, 테스트를 거치는 코드를 작성하였는데요. 훈련과 검증단계에서는 문제없이 진행되나 다른 섹션을 만들어 테스트코드를 돌리는중 type에러가 발생하였습니다. 왜 같은 dataset과 dataloader인데 test셋에서만 이런 문제가 나타나는건지 알고싶습니다. # 강의질문이 아니라 문제가 된다면 지우겠습니다ㅠㅠ