Windows에서 Python 파일 경로 오류 해결하기: 올바른 경로 입력 방법 총정리
·
🕵️에러 해결사
1. Python에서 파일 경로 입력 시 흔한 오류✅ (1) 파일 경로를 잘못 입력했을 때 발생하는 오류Python에서 파일을 열거나 읽을 때 파일 경로를 잘못 입력하면 아래와 같은 오류가 발생한다.❌ FileNotFoundError 오류file_path = "C:\Users\User\Downloads\kind_stock.xlsx"with open(file_path, "r") as f: data = f.read()⚠ 실행하면 이런 오류가 발생함:FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\User\Downloads\kind_stock.xlsx'✔ 원인: \U가 **이스케이프 문자(unicode escape)**로 인식됨 → \..
"detail": "Given token not valid for any token type" 토큰 인증 오류 해결
·
🕵️에러 해결사
에러 상황Postman에서 사용자 정보 조회를 위해 인증 토큰을 Header로 Bearer token 전달을 하였으나, 다음과 같은 응답이 나옴{    "detail": "Given token not valid for any token type",    "code": "token_not_valid",    "messages": [        {            "token_class": "AccessToken",            "token_type": "access",            "message": "Token has no id"        }    ]} jwt.io 에서 토큰 정보에 user_id가 포함되어 있는 것도, 만료 기간이 한참 남은 것도 확인했으나,여전히 token_no..
[Error]Id returned 1 exits status 에러 해결하기 (Dev C++)
·
🕵️에러 해결사
1. 에러 상황Dev C++에서 알고리즘을 풀던 중, 올바른 코드임에도 불구하고 , 혹은 정말 간단한 코드임에도 다음 에러를 자주 마주한 적이 있다.방금까지 잘 되던 코드가 갑자기 실행되지 않거나 하는 경우가 대부분이다.예전에는 새로이 파일을 만들고 다시 시작하는 등 했으나, 원인을 해결하여 기록하고자 한다. 2. 에러 원인1. main함수 중복같은 프로젝트 안에 main 함수는 하나여야 한다. 혹시 main 함수를 여러개 두고 있다면, 쓰지 않는 쪽을 주석처리하도록 하자.하지만 필자는 하나씩 생성했기에 이것이 원인은 아니었다. 2. 콘솔 도스창 확인알고리즘을 풀다보면 콘솔 창을 여러 개 띄워놓고는 한다. 문제를 풀어도 원하는 답이 안나오면 콘솔창을 닫지 않고 그냥 계속 실행했었다. 3. 에러 해결1의 ..
Spring Boot 프로젝트 실행 오류: Execution failed for task 해결 하기
·
🕵️에러 해결사
1. 에러 상황Spring 프로젝트를 실행하고 종료했을 때, 다음과 같은 에러가 뜨게 되었다. Execution failed for task ':~~.main()'. > Build cancelled while executing task ':~~.main()' * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. Deprecated Gradle features were used in this bu..
Spring Boot 프로젝트 실행 오류: Could not resolve all dependencies 해결하기
·
🕵️에러 해결사
1. 에러 상황Spring project를 생성하고 인텔리제이에서 실행 테스트를 하던 도중, 다음과 같은 에러가 발생했다.Could not resolve all dependencies for configuration ':compileClasspath'. Failed to calculate the value of task ':compileJava' property 'javaCompiler'. Cannot find a Java installation on your machine matching this tasks requirements: {languageVersion=21, vendor=any vendor, implementation=vendor-specific} for WINDOWS on x86_64. N..
AttributeError : Invalid API setting: 'JWT_PAYLOAD_HANDLER' 해결하기
·
🕵️에러 해결사
1. 에러 상황python, Django, VScode 환경에서 32bit 가상 환경을 만든 후 모듈들을 재설치하다가, 다음 에러를 만나게 되었다.AttributeError : Invalid API setting: 'JWT_PAYLOAD_HANDLER'이는 djangorestframework--simplejwt 라이브러리를 설치한 이후 발생한 문제였다. 일단 내 코드에서 JWT_PAYLOAD_HANDLER를 사용하는 코드를 찾아보자. 정확히는 터미널에 나온 로그를 확인하면 알 수 있다.내 코드의 경우, settings.py와 serializers.py에서 사용하고 있었다. #settings.pyJWT_AUTH = { "JWT_SECRET_KEY": SECRET_KEY, "JWT_ALGORIT..