hyunwooji@jihyeon-uui-MacBook-Air emotiondiary % npm install -g serve npm WARN config global --global , --local are deprecated. Use --location=global instead. npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/serve npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/serve' npm ERR! [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/serve'] { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/local/lib/node_modules/serve' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /Users/hyunwooji/.npm/_logs/2023-02-19T07_24_53_420Z-debug-0.log 구글링 해봣을때는 npm 업데이트 문제인거같다고로 찾아서 npm update 도 해봣는데 전혀 해결되지 않고 더 꼬이고 있는거같습니다.. 완강을 앞두고 좌절중이네요ㅠ 오늘 다 완강하고 싶었는데 도저히 해결이 안되어 질문남깁니다 감사합니다!!
이 강의에서 에러가 발생했습니다. 소스코드는 다음과 같습니다. import requests from bs4 import BeautifulSoup url = "https://www.naver.com/" response = requests.get(url) # 에러 발생한 부분 html = response.text soup = BeautifulSoup(html, 'html.parser') word = soup.select_one("#NM_set_home_btn") print(word.text) 위 코드중 response = requests.get(url) 위 부분에서 에러가 발생했습니다. [ 에러 내용 ] Max retries exceeded with url:강의에서 접속한 url 이런 에러가 나오고 Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available. 뒤에 이런 문장이 나옵니다. 에러 해결 방법은 무었인가요? [ 에러 전체 내용 ] 에러의 전체 내용은 다음과 같습니다. Exception has occurred: SSLError HTTPSConnectionPool(host='search.naver.com', port=443): Max retries exceeded with url: /search.naver?where=news&sm=tab_jum&query=%EC%82%BC%EC%84%B1%EC%A0%84%EC%9E%90 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) urllib3.exceptions.SSLError: Can't connect to HTTPS URL because the SSL module is not available. During handling of the above exception, another exception occurred: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='search.naver.com', port=443): Max retries exceeded with url: /search.naver?where=news&sm=tab_jum&query=%EC%82%BC%EC%84%B1%EC%A0%84%EC%9E%90 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) During handling of the above exception, another exception occurred: File "D:\crawling\05. 뉴스 제목과 링크 가져오기.py", line 4, in <module> response = requests.get("https://search.naver.com/search.naver?where=news&sm=tab_jum&query=%EC%82%BC%EC%84%B1%EC%A0%84%EC%9E%90") requests.exceptions.SSLError: HTTPSConnectionPool(host='search.naver.com', port=443): Max retries exceeded with url: /search.naver?where=news&sm=tab_jum&query=%EC%82%BC%EC%84%B1%EC%A0%84%EC%9E%90 (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
안녕하세요 재남님! 배포 과정에서 문제가 있어 질문 드립니다~ 현재 상황은 heroku에 깃 연동을 통해 배포를 한 상태입니다. 그렇기 때문에 herokuURL/graphql 을 입력하면 studio.apollographql.com 에서 날리는 api test도 잘 동작하고 있습니다. 그런데 vercel로 배포한 페이지에서는 products 화면을 제외한 cart, admin 같은 경우는 204 error가 뜨고 있는 상황입니다. 검색을 해보니 컨텐츠를 보여줄 필요가 없다(?) 라고 나오는데 어떤 문제인지 잘모르겠습니다.. ㅜ
안녕하세요. 데이터 증강 부분에 대해서 궁금점이 있어서 질문드립니다. 가지고 있는 데이터가 1000개 라고 가정했을 때, tr.Compose를 적용시키면 '기존 이미지 1000개 + 증강된 추가 이미지 개수' 가 되는건가요?? 제가 간단하게 해봤을 때는 transform 했을 때 이미지 개수 증가가 아니라 단순 이미지 변환까지만 이루어지는 것 같은데, 제가 잘못된 부분이 있는건가 좀 헷갈려서 질문 드립니다. 만약 단순 이미지 변환만 이루어지는 것이라면 이미지 개수 증가를 위해서 추가적인 작업을 진행해주어야 하는지도 궁금하네요.
안녕하세요 4일차 공부를 하던중 willpay를 cart 에서 밖으로 꺼내 willpay-index.tsx 로 변경하게 되면서 이러한 오류가 뜨면서 장바구니가 담아지지 않습니다.(장바구니가 비어있을 때는 비어있다는 텍스트는 출력이됩니다) 코드상 오류 표시는 안나는데 해결이 안되서 여쭤봅니다. 감사합니다.
200여개의 csv 파일이 있습니다. (용량은 각각 1메가에서 120메가 - 최대 100만건 데이터 등등 ). 결측치 가 있어서 판다스 에서 불러들여서 정리하고 for 반복문으로 파일 개별적으로 읽어 들여와 장고 모델에 save() 로 입력시키는 작업을 진행하고 있습니다. 초반 10여개 파일까지는 제법 속도가 나오는데 (7만행 데이터 20분 소요) 이후로 속도가 급격하게 감소해서 24시간 돌려서 30메가 파일 겨우 저장 중입니다(1건에 1초씩 걸리네요 ㅠㅠ). 개발중이라 로컬에 있는 장고 내장 sqlite 사용 했습니다. 속도를 좀 더 빠르게 하는 방법이 있을까요? 3일째 검색 해봤는데 별다른 해결책이 보이지 않아서 질문 남겨 봅니다. app.py # new 폴더에 정리된 csv 파일을 읽어서 DB에 저장 import pandas as pd # django 프로젝트에 있는 settings.py 파일을 읽어서 환경변수로 설정 import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dbking.settings") import django django.setup() #django 프로젝트에 있는 models.py 파일에서 BasicData 클래스를 읽어온다 from common.models import BasicData # new 폴더에 있는 파일명을 읽어서 product 변수에 리스트에 저장 product_list = os.listdir("./script/newdb") # product_list 에 csv 파일 정렬(오름차순) for x in product_list: # csv 파일 하나씩 읽어오기 df = pd.read_csv("./script/newdb/" + x, encoding="cp949") # 결측치를 0으로 채운다 df = df.fillna(0) for a in list_of_csv: # 파일마다 컬럼수가 달라서 remark1, remark2 라는 예비컬럼 2개 추가 # -> 인덱스 에러 나는 경우 0 으로 저장 if a[16] is None: a.insert(16, 0) a.insert(17, 0) elif a[17] is None: a.insert(17, 0) # DB에 저장 try: db_insert = BasicData( opnSvcId = a[2], opnSfTeamCode = a[3], mgtNo = a[4], fileNumber = fileNumber, businessType = businessType, opnSvcNm = a[1], apvPermYmd = a[5], confirmNumber = a[6], businessCondition = a[7], siteTel = a[8], sitePostNo = a[9], siteWhlAddr = a[10], rdnWhlAddr = a[11], rdnPostNo = a[12], bplcNm = a[13], latitude = a[14], longitude = a[15], remark1 = a[16], remark2 = a[17], ) i += 1 # print(i) except Exception as e: print("쿼리", e) continue #DB에 저장 입력 try: db_insert.save() except Exception as e: print("저장중에러",e) continue from django.db import models class BasicData(models.Model): # 개방서비스아이디 opnSvcId = models.CharField(max_length=100) #개방자치단체코드 opnSfTeamCode = models.CharField(max_length=10) # 관리번호 mgtNo = models.CharField(max_length=100) #파일번호 fileNumber = models.IntegerField() #업종명 businessType = models.CharField(max_length=100) #개방서비스명 opnSvcNm = models.CharField(max_length=100) #인허가일자 apvPermYmd = models.DateField() #영업상태구분코드(1-정상, 2-폐업, 3-휴업, 4-전환) confirmNumber = models.IntegerField() #영업상태명 businessCondition = models.CharField(max_length=100) #소재지전화 siteTel = models.CharField(max_length=100) #우편번호 sitePostNo = models.CharField(max_length=100) #주소 siteWhlAddr = models.CharField(max_length=100) #도로명주소 rdnWhlAddr = models.CharField(max_length=100) #도로명우편번호 rdnPostNo = models.CharField(max_length=100) #사업장명 bplcNm = models.CharField(max_length=100) # 위도 latitude = models.FloatField() # 경도 longitude = models.FloatField() #비고1 remark1 = models.CharField(max_length=100) #비고2 remark2 = models.CharField(max_length=100) # 생성시점 created = models.DateTimeField(auto_now_add=True) update = models.DateTimeField(auto_now=True) def save(self, *args, **kwargs): queryset = BasicData.objects.filter(mgtNo__exact=self.mgtNo) # 중복된 이름이 없을 때만 저장 if len(queryset) == 0: super().save(*args, **kwargs) print('> Created new category') # if '&' in self.addr: # self.addr = self.addr.replace('&', ' ') # self.save() # 중복된 카테고리 있을 시 저장 안함 else: print('> Cannot create category with existing name') def __str__(self): return self.name
안녕하세요. 어제부터 DeepingSauce님 로드맵을 갓 시작한 코린이 입니다. 금일 강의를 전부 결재하고 시작점에 섰는데 확인해보니 공부 환경상 Jupyter lab 활용이 불가능 하여 두가지 질문 드립니다. Colab 활용 가능성 수강 환경상 Jupyter Notebook은 쓸 수 있지만 Jupyter Lab의 사용이 불가능합니다. 그래서 Colab을 사용해볼까 하는데, 수업 진행에 무리가 없을런지 질문 드립니다. (수업내용을 보니 Jupyter에 Extention까지 설치해서 사용하던데 Colab이 해당 기능들을 다 지원할지 모르겠습니다.) Colab 설치 및 세팅방법 Colab이 활용 가능하다면 선생님 수업을 위해 (Jupyter Lab에서 했듯이) Colab의 설치 및 세팅방법도 알고 싶습니다. 혹시 가능하다면 안내 부탁 드립니다. 아는 지식이 짧아 있는 그대로 질문 드립니다.
a = {'Phone': '01095136634', 'birth': '910904', 'adress': 'Busan', 'rank': [1, 2, 3], 'test': 'test_dict'} a라는 딕셔너리에서 910904라는 value값을 통해 key 값을 찾아서 출력 하고 싶습니다. 제가 생각 해낸 방법은 딕셔너리에는 순서가 없음으로 리스트로 형 변환을 하여 해당하는 인덱스를 불러오는 방법을 사용했습니다. print(list(a.keys())[list(a.values()).index('910904')]) 이거보다 더 효율적이고 간결한 방법이 있을 가요?
unittest 기반의 Unit Test시 Celery 혹은 ProcessPoolExecutor을 이용하면 해당 Context에서 DB 접근 시, Test DB를 참조 하는 것이 아니라 settings의 Default로 설정해놓은 Exist DB에 접근하는 이슈가 있더군요. 해당하는 경우 어떻게 해야 Test DB로 붙어서 작업할 수 있을까요? with concurrent.futures.ProcessPoolExecutor() as executor:
따라하며 배우는 노드, 리액트 시리즈 - 레딧 사이트 만들기(NextJS)(Pages Router)
client 쪽에서는 에러가 안나지만 server 쪽에서 데이터는 잘 받지만 Error: DataSource is not set for this entity. 나네요. 백엔드쪽은 익숙하지가 않아 구글링을 해봐도 어디서 에러가 나는지 잘 모르겠습니다. 게시판에 유사한 글이 있긴 하지만 해결책을 안되어 문의 드려요. AppDataSource는 이렇게 되어있습니다. 제 깃 주소는 https://github.com/ssinking91/Reddit 입니다. 이 버그 너무 해결하고 싶습니다. 감사합니다. 임시방편으로 모든 entity를 불러와 AppDataSource의 entities경로로 넣어 줬습니다. 혹시 에러나시는 분들 임시방편으로 이렇게 해주시면 잘 됩니다. import "reflect-metadata"; import { DataSource } from "typeorm"; import User from "./entities/User"; import Post from "./entities/Post"; import Sub from "./entities/Sub"; import Comment from "./entities/Comment"; import Vote from "./entities/Vote"; export const AppDataSource = new DataSource({ type: "postgres", host: "localhost", port: 5432, username: "postgres", password: "password", database: "postgres", synchronize: true, logging: false, // entities: ["src/entities/**/*.ts"], entities: [User, Post, Sub, Comment, Vote], migrations: [], subscribers: [], });