inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

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

BOJ 10870 문제 질문드립니다.

해결됨

세계 대회 진출자가 알려주는 코딩테스트 A to Z (with Python)

섹션 2의 재귀함수 이해하기 파트에서 풀이 1에서 n을 입력하는 것과 0,1의 값을 정해주는 것 그리고 for문의 형식까지는 이해했습니다. 하지만 arr = [-1] * (n + 2) 가 주석을 봐도 어떤 것을 의미하는지 잘 모르겠습니다

  • python
  • 코딩-테스트
  • 알고리즘
  • 재귀함수
내꿈은프로틴부자 댓글 1 좋아요 0 조회수 170

안녕하세요. 9장 질문입니다. 아래와 같은 에러가 발생했어요..

미해결

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

소스코드: movies_df['genres_literal'] = movies_df['genres'].apply(lambda x : (' ').join(x)) count_vect = CountVectorizer(min_df=0, ngram_range=(1,2)) genre_mat = count_vect.fit_transform(movies_df['genres_literal']) print(genre_mat.shape) 에러 코드: InvalidParameterError Traceback (most recent call last) Cell In[99], line 10 8 count_vect = CountVectorizer(min_df=0, ngram_range=(1,2)) 9 # print(movies_df['genres_literal']) ---> 10 genre_mat = count_vect.fit_transform(movies_df['genres_literal']) File D:\dev03\anaconda\Lib\site-packages\sklearn\base.py:1467, in _fit_context.<locals>.decorator.<locals>.wrapper(estimator, *args, **kwargs) 1462 partial_fit_and_fitted = ( 1463 fit_method.__name__ == "partial_fit" and _is_fitted(estimator) 1464 ) 1466 if not global_skip_validation and not partial_fit_and_fitted: -> 1467 estimator._validate_params() 1469 with config_context( 1470 skip_parameter_validation=( 1471 prefer_skip_nested_validation or global_skip_validation 1472 ) 1473 ): 1474 return fit_method(estimator, *args, **kwargs) File D:\dev03\anaconda\Lib\site-packages\sklearn\base.py:666, in BaseEstimator._validate_params(self) 658 def _validate_params(self): 659 """Validate types and values of constructor parameters 660 661 The expected type and values must be defined in the `_parameter_constraints` (...) 664 accepted constraints. 665 """ --> 666 validate_parameter_constraints( 667 self._parameter_constraints, 668 self.get_params(deep=False), 669 caller_name=self.__class__.__name__, 670 ) File D:\dev03\anaconda\Lib\site-packages\sklearn\utils\_param_validation.py:95, in validate_parameter_constraints(parameter_constraints, params, caller_name) 89 else: 90 constraints_str = ( 91 f"{', '.join([str(c) for c in constraints[:-1]])} or" 92 f" {constraints[-1]}" 93 ) ---> 95 raise InvalidParameterError( 96 f"The {param_name!r} parameter of {caller_name} must be" 97 f" {constraints_str}. Got {param_val!r} instead." 98 ) InvalidParameterError: The 'min_df' parameter of CountVectorizer must be a float in the range [0.0, 1.0] or an int in the range [1, inf). Got 0 instea

  • python
  • 머신러닝
  • 통계
자스민 댓글 1 좋아요 0 조회수 166

동영상 버그

해결됨

(2026 최신!) 일주일만에 합격하는 정보처리기사 실기

동영상 재생이 제대로 보이지 않고 버그 현상이 반복 됩니다 한번쯤은 점검이 있어야 될 것 같네요

  • python
  • java
  • c
  • 정보처리기사
hoogok 댓글 1 좋아요 0 조회수 108

세팅

미해결

[리뉴얼] 파이썬입문과 크롤링기초 부트캠프 [파이썬, 웹, 데이터 이해 기본까지] (업데이트)

안녕하세요. 강의 그대로 따라해도 세팅부터 막히는데 어떻게 하나요? 파일을 만들고 나서 셀에 입력하는 화면이 안나오는데요. 강의에서 python3으로 들어가면 강의에서는 셀을 입력할 수 있도록 나오는데 저는 python3이라는게 뜨지를 않습니다.

  • python
  • 웹-크롤링
고예진 댓글 1 좋아요 0 조회수 73

설치 v1.27(win/mac intel) 문의

미해결

대세는 쿠버네티스 (초급~중급편)

xshell이 윈도우만 지원하는 것 같은데, mac intel에서는 어떤 걸 써야할까요? 구글링해보니 open ssh를 사용하라고 하는데, 대체가 가능한건지 모르겠네요 mac intel 사용지 XShell 대체방법도 가이드되면 좋을 거 같습니다

  • docker
  • kubernetes
lge.cloiservice2 댓글 1 좋아요 1 조회수 206

섹션5 <공지>

미해결

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

섹션5 <공지> 코드 https://github.com/chulminkw/DLCV <여기에 있나요?? 찾아도 없어서요.

  • python
  • 머신러닝
  • 딥러닝
  • keras
  • tensorflow
  • 컴퓨터-비전
WY Lee 댓글 1 좋아요 0 조회수 112

Access denied for user ‘root’@’localhost’ (using password:YES)

미해결

비전공자도 이해할 수 있는 Docker 입문/실전

compose.yml services: instagram-server: image: 420787877062.dkr.ecr.ap-northeast-2.amazonaws.com/instargram-server ports: - 8080:8080 depends_on: my-db: condition: service_healthy my-cache-server: condition: service_healthy my-db: image: mysql environment: MYSQL_ROOT_PASSWORD: 00000000 MYSQL_DATABASE: mydb volumes: - ./mysql_data:/var/lib/mysql ports: - 3306:3306 healthcheck: test: [ "CMD", "mysqladmin", "ping" ] interval: 5s retries: 10 my-cache-server: image: redis ports: - 6379:6379 healthcheck: test: [ "CMD", "redis-cli", "ping" ] interval: 5s retries: 10 이렇게 yml을 설정하고 docker inspect 명령어를 사용하여 mysql 정보를 gpt 한테 물어봤더니 아래와 같은 답변이 있었습니다. 현재 MySQL 컨테이너의 상태는 “healthy”로 보이며, 전체적으로 Docker Compose 설정이 잘 작동하고 있다. 하지만 MySQL의 Healthcheck가 Access denied for user 'root'@' localhost ' (using password: YES) 오류 메시지를 출력하고 있다. 이는 MySQL이 root 사용자로 접속을 시도할 때 비밀번호 인증에 실패했다는 것을 의미한다. 이를 해결하기 위해서, 비밀번호를 ' 로 감싸서 String으로 인식하도록 유도 하기도 했지만 여전히 문제는 해결되지 않고 있습니다. 구글링을 해본 결과 도커 볼륨과 연관있는 것 같지만 정확한 이유를 모르겠습니다.

  • docker
  • docker-compose
  • docker-volume
  • docker-image
  • container
  • ecr
이승욱 댓글 1 좋아요 0 조회수 394

나만의 Azure OpenAI service (gpt-4o) 구성하기

해결됨

Azure Native로 나만의 GPT 만들기

조금씩이지만 열심히 따라서 구현을 해 보려고 하지만 모르는게 너무 많아 조금은 힘드네요 그래도 강의 내용이 스텝 바이 스텝으로 상세해 아주 큰 도움이 됩니다 저희 중요 업무는 고객 요구 사항들 (텍스트/ 이미지)이 기록되어 있는 문서를 참조로 현재 개발된 디자인이 모든 요구 사항들을 다 잘 지켜서 개발이 완료된 건지를 체크하는 일입니다 기존에 일일히 하나하나 체크를 하다 보니 시간도 너무 오래 걸리고 일부 경험 많은 엔지니어의 경우 기존 경험에 의존해 체크가 누락되는 경우도 발생이 되고 있습니다 이에 고객 요구 사항들을 AI (gpt-4o)에게 학습시키고 완료된 디자인 문서를 프로프팅 창에 입력해 자동으로 미지원 항목을 체크해 알려주는 기능을 만드는 것이 목표입니다 이를 위해 프롬프트 창에 디자인 문서 (텍스트/ 파워포인트/ PDF/ JPG 등) 멀티모달 프롬프팅이 되어야 디자이너 스스로 자기가 만든 디자인 파일의 셀프 체크가 가능하기에 gpt-4o를 선택해서 구현을 할려고 합니다 여기서 중요한건 비교를 해야 하는 고객 요구 사항을 어떻게 gpt-4o에게 학습시키는지에 대해 잘 몰라 난감해서 문의 드립니다 가장 효과적인 학습 방법에 대한 조언을 주실 수 있으실지요? 사내 전용 우리 회사만의 GPT라면 비교 자료도 나만의 자료가 되는게 필요해서 문의 드립니다 답변 부탁 드리겠습니다 감사합니다

  • javascript
  • python
  • mongodb
  • azure
  • FastAPI
tk.lee 댓글 2 좋아요 1 조회수 362

완전탐색 숫자야구 뭐가 틀린지 모르겠어요..

해결됨

2주만에 통과하는 알고리즘 코딩테스트 (2024년)

n = int(input()) hint = [list(map(int,input().split())) for _ in range(n)] answer = 0 #100 ~ 999 for a in range(1,10): # 100의 자리 for b in range(10): # 10의 자리 for c in range(10): # 1의 자리 if (a == b or b == c or c == a): continue cnt = 0 for arr in hint: number = list(map(int, str(arr[0]))) strike = arr[1] ball = arr[2] ball_count = 0 strike_count = 0 #스트라이크카운트 자리수,숫자 둘다 if number[0] == a: strike_count += 1 if number[1] == b: strike_count += 1 if number[2] == c: strike_count += 1 #볼카운트 자리수는 안맞고 숫자만 if a in number and number[0] != a: ball_count += 1 if b in number and number[1] != b: ball_count += 1 if c in number and number[2] != c: ball_count += 1 if ball == ball_count and strike == strike_count: cnt += 1 if cnt == n: answer += 1 print(answer)

  • python
  • 코딩-테스트
  • 알고리즘
댓글 2 좋아요 1 조회수 230

설치 오류 문의드려요

미해결

대세는 쿠버네티스 (초급~중급편)

https://kubetm.github.io/k8s/02-beginner/cluster-install-case6/ 위 페이지를 보면서 설치 중인데 vagrant up 명령어시 아래와 같이 에러가 뜨네요(참고로 mac 인텔입니다) ==> k8s-master: Box 'rockylinux/8' could not be found. Attempting to find and install... k8s-master: Box Provider: virtualbox k8s-master: Box Version: >= 0 ==> k8s-master: Loading metadata for box 'rockylinux/8' k8s-master: URL: https://vagrantcloud.com/rockylinux/8 ==> k8s-master: Adding box 'rockylinux/8' (v9.0.0) for provider: virtualbox k8s-master: Downloading: https://vagrantcloud.com/rockylinux/boxes/8/versions/9.0.0/providers/virtualbox/unknown/vagrant.box Download redirected to host: dl.rockylinux.org An error occurred while downloading the remote file. The error message, if any, is reproduced below. Please fix this error and try again. The requested URL returned error: 404 그리고 추가로 강의를 보면 도커하고 쿠버네티스 설치 내용이 있나요? 건너뛰고 바로 XSHELL부터 설치하는 것 같아 문의드립니다.

  • docker
  • kubernetes
lge.cloiservice2 댓글 2 좋아요 1 조회수 305

쿠폰 발급 유저 흐름에 대한 질문

미해결

실습으로 배우는 선착순 이벤트 시스템

쿠폰이 발급되고 바로 사용하려는 유저가 있다면 어떻게해야하나요? 실무에서 보통의 경우 어떻게 처리하는지 궁금한데요. 예를 들어서, 쿠폰이 생성되려면 시간이 다소 소요될 수 있다는 안내 문구와 같은 정책으로 안고가는지.. 아니면 다른 좋은 방법이 있는지 궁금합니다. 강의 내용 흐름 레디스를 통해서 싱글 스레드로 쿠폰 개수 확인 제한 범위 안이라면 클라이언트에게 쿠폰 발급 성공 응답 비동기로 처리량을 조절하면서 쿠폰 데이터를 저장 실제 유저가 아직 쿠폰 발급이 안되었는데, 쿠폰 사용 시도 이 경우 어떻게 대응하는지 궁금합니다.

  • java
  • docker
  • spring-boot
  • kafka
  • redis
이민준 댓글 2 좋아요 0 조회수 326

아예 Linux Ubuntu PC에서 실습을 따라하려고 하는데

해결됨

개발자를 위한 쉬운 도커

아예 ubuntu Linux PC에서 따라하려고 하는데 Docker Desktop이랑 많이 혼동이 될까요?

  • docker
  • 가상화
  • ci/cd
  • docker-compose
  • github-actions
  • docker-volume
  • docker-image
  • container
asg5450 댓글 2 좋아요 1 조회수 149

선생님 users.resolver.spec코드좀 봐주세요!

미해결

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

import { Test } from '@nestjs/testing'; import { UsersService } from '../users.service'; import { IContext } from 'src/commons/interfaces/context'; import { Request, Response } from 'express'; // 주로 DB 작업할 때 가짜DB 만들 때 사용함 class MockUsersService { mydb = []; create({ email, password, name, age }): string { this.mydb.push({ email, password, name, age }); const token = 'token'; return token; } } describe('UsersResolver', () => { let usersService: UsersService; beforeEach(async () => { const usersModule = await Test.createTestingModule({ providers: [ UsersService, { provide: UsersService, useClass: MockUsersService, }, ], }).compile(); usersService = usersModule.get<UsersService>(UsersService); }); describe('fetchUser', () => { it('유저 정보 찾기', () => { const mockRequest: Request & { user?: { id: string } } = { user: { id: '12345' }, } as Request & { user: { id: string } }; const mockResponse: Response = {} as Response; const mockContext: IContext = { req: mockRequest, res: mockResponse, }; expect(mockContext.req.user).toStrictEqual({ id: '12345' }); }); }); describe('createUser', () => { it('유저 등록하기', async () => { const mockToken = 'token'; const mockUser = { email: 'aaa@aaa.com', password: '1234', name: '정중식', age: 12, }; const result = await usersService.create({ ...mockUser }); // 반환 값이 mockToken과 일치하는지 확인 expect(result).toBe(mockToken); }); }); }); 강의에서는 app.controller.spec랑 똑같이하시면됩니다~ 하고 넘어가셔서 챗지피티랑 손잡고 짜봣는데요.. 어떤가요? 맞게했나요?.. 개념도 생소하고 코드짜는게 넘 어렵네요.. 챗지피티 이자식은 목업클래스 안만들어주고 지름길 같은 jest.fn()같은 메서드로 목업함수 만들어주고.... 선생님 답변기다리겠씁니다!

  • javascript
  • node.js
  • docker
  • rest-api
  • nestjs
반가우면반갑다고해 댓글 1 좋아요 0 조회수 139

SyntaxWarning: invalid escape sequence '\.' 에러가

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

제가 뭘 건든건지 잘되던게 갑자기 SyntaxWarning: invalid escape sequence '\.' 에러가 출력됩니다. 셀레니움 css셀렉터에서 검색 카피해와서 붙였는데 그중에 \ 들어가면 에러를 내보네요.. 이유를 모르겠습니다.

  • python
  • 웹-크롤링
J Park 댓글 2 좋아요 1 조회수 2106

백엔드 서버 외부 접속 차단

해결됨

[코드캠프] 부트캠프에서 만든 고농축 백엔드 코스

백엔드를 " https://api.example.com" 프론트엔드를 " https://example.com " 이렇게 배포했습니다. 그런데 백엔드 서버는 example.com 이 주소에서 api 요청만 가능하고, https://api.example.com/graphql 은 주소창에 검색해도 접속 못하게 하고 싶습니다. 어떻게 해야할까요?

  • javascript
  • node.js
  • docker
  • rest-api
  • nestjs
0516dmswjd 댓글 2 좋아요 0 조회수 329

바탕쪽, 머리말, 꼬리말, 미주 장식, 두 줄이상의 빈 줄 삭제

해결됨

직장인에게 꼭 필요한 파이썬-아래아한글 자동화 레시피

hwp 파일에서 바탕쪽, 머리말, 꼬리말, 미주 장식, 두 줄이상의 빈 줄을 자동으로 없애고자 강의를 수강합니다. 힌트를 얻고 싶습니다.

  • python
  • 한컴오피스
rosetteer 댓글 1 좋아요 1 조회수 954

240825현재 네이버쇼핑에서 "닭가슴살"검색후 a 태그를 못가져오네요

미해결

[신규 개정판] 이것이 진짜 크롤링이다 - 실전편 (인공지능 수익화)

11.네이버 쇼핑 크롤링의 3편 데이터 추출하기(복작한 HTML)구조 편에서 # 나무태그 선택자 만들기 soup.select(".product_item__MDtDF")까지 하더라도 a 태그에 해당되는 부분을 가져오지 못합니다. 네이버 쇼핑에서 크롤링을 차단하는 것인지, 다른 방법으로 크롤링하는 방법은 없는건가요?

  • python
  • 웹-크롤링
BlueCloud 댓글 1 좋아요 1 조회수 134

EmailOperator 강습 중에 실행 오류 관련 문의 드립니다.

미해결

Airflow 마스터 클래스

강사님 *** !!!! Please make sure that all your Airflow components (e.g. schedulers, webservers, workers and triggerer) have the same 'secret_key' configured in 'webserver' section and time is synchronized on all your machines (for example with ntpd) See more at https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#secret-key *** Could not read served logs: 403 Client Error: FORBIDDEN for url: http://e1efbc97ae25:8793/log/dag_id=dags_email_operator/run_id=manual__2024-08-24T06:22:20.118495+00:00/task_id=send_email_task/attempt=1.log [2024-08-24, 06:22:25 UTC] {local_task_job_ runner.py:123 } ▶ Pre task execution logs [2024-08-24, 06:22:25 UTC] {warnings.py:112} WARNING - /home/***/.local/lib/python3.12/site-packages/***/utils/email.py:155: RemovedInAirflow3Warning: Fetching SMTP credentials from configuration variables will be deprecated in a future release. Please set credentials using a connection instead. send_mime_email(e_from=mail_from, e_to=recipients, mime_msg=msg, conn_id=conn_id, dryrun=dryrun) [2024-08-24, 06:27:49 UTC] {taskinstance.py:3301} ERROR - Task failed with exception Traceback (most recent call last): File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/taskinstance.py", line 767, in execute task result = execute callable(context=context, **execute_callable_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/taskinstance.py", line 733, in execute callable return ExecutionCallableRunner( ^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/operator_helpers.py", line 252, in run return self.func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/models/baseoperator.py", line 406, in wrapper return func(self, args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/operators/email.py", line 79, in execute send_email( File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 80, in send_email return backend( ^^^^^^^^ File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 155, in send_email_smtp send_mime_email(e_from=mail_from, e_to=recipients, mime_msg=msg, conn_id=conn_id, dryrun=dryrun) File "/home/airflow/.local/lib/python3.12/site-packages/airflow/utils/email.py", line 280, in send_mime_email smtp_conn.starttls() File "/usr/local/lib/python3.12/smtplib.py", line 779, in starttls self.sock = context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/ssl.py", line 455, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/ssl.py", line 1042, in create self.do handshake() File "/usr/local/lib/python3.12/ssl.py", line 1320, in do_handshake self._sslobj.do_handshake() TimeoutError: _ssl.c:983: The handshake operation timed out 위 문구와 함께 현재 smtp.gmail.com 에 접속이 안되는데.. (worker에서도 접속이 안됨) 혹시 다른 설정이 필요할게 있을까요?

  • python
  • 데이터-엔지니어링
  • airflow
walnam777 댓글 3 좋아요 0 조회수 374

안녕하세요 표 생성이 막힙니다.

미해결

직장인에게 꼭 필요한 파이썬-아래아한글 자동화 레시피

import win32com.client import os import shutil # 캐시 디렉토리 경로 cache_dir = os.path.join(os.getenv('LOCALAPPDATA'), 'Temp', 'gen_py') # 캐시 디렉토리 삭제 if os.path.exists(cache_dir): shutil.rmtree(cache_dir) # 캐시 재생성 및 한글 객체 생성 hwp = win32com.client.gencache.EnsureDispatch("hwpframe.hwpobject") hwp.XHwpWindows.Item(0).Visible = True hwp.RegisterModule("FilePathCheckDLL", "FilePathCheckerModule") # 문서 시작 위치로 커서 이동 hwp.MovePos(2) # 문서 시작으로 커서 이동 # 표 생성: 행(5), 열(3) act = hwp.CreateAction("TableCreate") pset = act.CreateSet() act.GetDefault(pset) pset.SetItem("Cols", 3) pset.SetItem("Rows", 5) act.Execute(pset) 이게 실행코드고 오류는 --------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:255, in GetModuleForCLSID(clsid) 254 try: --> 255 __import__(sub_mod_name) 256 except ImportError: ModuleNotFoundError: No module named 'win32com.gen_py.7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0.IDHwpAction' During handling of the above exception, another exception occurred: FileNotFoundError Traceback (most recent call last) Cell In[3], line 21 18 hwp.MovePos(2) # 문서 시작으로 커서 이동 20 # 표 생성: 행(5), 열(3) ---> 21 act = hwp.CreateAction("TableCreate") 22 pset = act.CreateSet() 23 act.GetDefault(pset) File ~\AppData\Local\Temp\gen_py\3.12\7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0\IHwpObject.py:106, in IHwpObject.CreateAction(self, actidstr) 103 ret = self._oleobj_.InvokeTypes(10031, LCID, 1, (9, 0), ((8, 1),),actidstr 104 ) 105 if ret is not None: --> 106 ret = Dispatch(ret, 'CreateAction', None) 107 return ret File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\__init__.py:119, in Dispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString, clsctx) 117 assert UnicodeToString is None, "this is deprecated and will go away" 118 dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch, userName, clsctx) --> 119 return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, clsctx=clsctx) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\__init__.py:47, in __WrapDispatch(dispatch, userName, resultCLSID, typeinfo, UnicodeToString, clsctx, WrapperClass) 43 from . import gencache 45 # Attempt to load generated module support 46 # This may load the module, and make it available ---> 47 klass = gencache.GetClassForCLSID(resultCLSID) 48 if klass is not None: 49 return klass(dispatch) File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:200, in GetClassForCLSID(clsid) 198 if CLSIDToClass.HasClass(clsid): 199 return CLSIDToClass.GetClass(clsid) --> 200 mod = GetModuleForCLSID(clsid) 201 if mod is None: 202 return None File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\gencache.py:264, in GetModuleForCLSID(clsid) 261 info = demandGeneratedTypeLibraries[info] 262 from . import makepy --> 264 makepy.GenerateChildFromTypeLibSpec(sub_mod, info) 265 # Generate does an import... 266 mod = sys.modules[sub_mod_name] File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\makepy.py:377, in GenerateChildFromTypeLibSpec(child, typelibInfo, verboseLevel, progressInstance, bUnicodeToString) 374 progress.LogBeginGenerate(dir_path_name) 376 gen = genpy.Generator(typelib, info.dll, progress) --> 377 gen.generate_child(child, dir_path_name) 378 progress.SetDescription("Importing module") 379 importlib.invalidate_caches() File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\genpy.py:1363, in Generator.generate_child(self, child, dir) 1361 out_name = os.path.join(dir, an_item.python_name) + ".py" 1362 worked = False -> 1363 self.file = self.open_writer(out_name) 1364 try: 1365 if oleitem is not None: File ~\AppData\Roaming\Python\Python312\site-packages\win32com\client\genpy.py:1049, in Generator.open_writer(self, filename, encoding) 1039 def open_writer(self, filename, encoding="mbcs"): 1040 # A place to put code to open a file with the appropriate encoding. 1041 # Does *not* set self.file - just opens and returns a file. (...) 1046 # don't step on each others' toes. 1047 # Could be a classmethod one day... 1048 temp_filename = self.get_temp_filename(filename) -> 1049 return open(temp_filename, "wt", encoding=encoding) FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\lemon\\AppData\\Local\\Temp\\gen_py\\3.12\\7D2B6F3C-1D95-4E0C-BF5A-5EE564186FBCx0x1x0\\IDHwpAction.py.7700.temp' 이렇게 나오는데 해결할 수 있는 방법 있을까요?

  • python
  • 한컴오피스
한글치트키 댓글 1 좋아요 1 조회수 314

ProjectSkill과 Skill 객체 생성 관련 질문있습니다.

해결됨

입문자를 위한 Spring Boot with Kotlin - 나만의 포트폴리오 사이트 만들기

테스트코드 작성하는 강의를 막 마치고, html '/test' 생성하여 확인하는 강의를 진입하여 듣던중, test만 돌리다 오랜만에 datainitilizer가 불리도록 run을 하니, org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataInitializer': Invocation of init method failed Caused by: org.hibernate.TransientPropertyValueException: Not-null property references a transient value - transient instance must be saved before current operation : com.mkim.portfolio.domain.entity.ProjectSkill.skill -> com.mkim.portfolio.domain.entity.Skill 이런 에러가 발생하였습니다. 테스트코드 작성 강의전에는 정상적으로 datainitializer 호출되었고, 테스트 케이스도 전부 패스한 상황이라 무엇이 문제인가 계속 확인을 하는데 이해한 바로는 ProjectSkill이 Skill 엔티티를 참조해야하지만 아직 생성이 안된 상태라 발생하는것처럼 이해하였는데, val java = Skill(name = "Java", type = SkillType.LANGUAGE.name, isActive = true) val kotlin = Skill(name = "Kotlin", type = SkillType.LANGUAGE.name, isActive = true) val python = Skill(name = "Python", type = SkillType.LANGUAGE.name, isActive = true) val spring = Skill(name = "Spring", type = SkillType.FRAMEWORK.name, isActive = true) . . . skillRepository.saveAll( mutableListOf( java, kotlin, spring, . . . ) . ... ..... project1.skills.addAll( mutableListOf( ProjectSkill(project = project1, skill = java), ProjectSkill(project = project1, skill = spring), ProjectSkill(project = project1, skill = mysql), ProjectSkill(project = project1, skill = redis) ) ) 이렇게 작성하여 부르면 에러가 나지만 val skills = mutableListOf( Skill(name = "Java", type = SkillType.LANGUAGE.name, isActive = true), Skill(name = "Kotlin", type = SkillType.LANGUAGE.name, isActive = true), Skill(name = "Python", type = SkillType.LANGUAGE.name, isActive = true), Skill(name = "Spring", type = SkillType.FRAMEWORK.name, isActive = true), Skill(name = "Django", type = SkillType.FRAMEWORK.name, isActive = true), Skill(name = "MySQL", type = SkillType.DATABASE.name, isActive = true), Skill(name = "Redis", type = SkillType.DATABASE.name, isActive = true), Skill(name = "Kafka", type = SkillType.TOOL.name, isActive = true) ) skillRepository.saveAll(skills) . ... ..... project1.skills.addAll( mutableListOf( ProjectSkill(project = project1, skill = skills[0]), // Java ProjectSkill(project = project1, skill = skills[3]), // Spring ProjectSkill(project = project1, skill = skills[5]), // MySQL ProjectSkill(project = project1, skill = skills[6]) // Redis ) ) 이와 같이하면 에러가 살아집니다... 무엇이 달라 차이를 만드는지가 너무 궁금하여 질문 남겨요 감사합니다, 전체 현재까지 코드 깃허브

  • kotlin
  • mysql
  • docker
  • spring-boot
  • jpa
D Kim 댓글 1 좋아요 0 조회수 133

인기 태그

인프런 TOP Writers

주간 인기글