본문 바로가기

반응형

오류모음집

(23)
다른 파일에서 명시적으로 model 를 불러올때 에러 Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label 이 에러가 아닌데 비슷함 DB값만 바꾸면 똑같은 에러임 1. 발생 경위 django model 에서 ORM 값을 명시적으로 app_label 를 설정을 안해줬음 에러속에 해답이 있음 2. 해결 방안 ORM Meta class 에 app_label 를 명시적으로 선언해줄것
Django 를 안쓰고 python file compile 했을때 대처법 1. 발생 경위 django 모듈을 사용안하고 python file 을 compile 실행 2. 해결 방안 실행할 python application 위에다 setting 값 설정 후 실행
error getting credentials - err: exit status 1, out: `` docker-build 시 발생 대처 방안 도커 경로 이동 cd ~/.docker rm -rf config.json
failed to solve with frontend dockerfile.v0: failed to create LLB definition: docker-desktop reset 재실행 오른쪽 위 벌레 클릭 reset 클릭 → yes 누르기 재시작 기다리기
docker-compose directory (경로를 못찾거나 마운트를 할 수 없는 상황 ) 맥 기준 대처 방안 스택오버 플로우 해결 방안 발췌 https://stackoverflow.com/questions/45122459/mounts-denied-the-paths-are-not-shared-from-os-x-and-are-not-known-to-docke 맥은 리눅스와 다르게 경로가 정해져 있어서 내가 지정한 볼륨을 docker file 에 명시적으로 설정을 해줘야함
docker-compose env file (로딩이 안된 상황) 1. 대처 방안 스택오버플로우 해결 방안 발췌 https://stackoverflow.com/questions/64723235/docker-compose-environment-variables-blank-string docker가 자동으로 구문 분석할 수 있도록 파일 이름을 명시적으로 배치함 (유연하게) sudo docker-compose —env-file 자기 경로 up —build sudo docker-compose —env-file 자기 경로 config
🐍 TypeError: object dict can't be used in 'await' expression 발단 사항 -> 비동기 작업중 발생 발단 원인 -> 사용하는 함수 중 비동기 함수로 설정 안한 것이 있으면 일어나는 에러 내가 사용하는 함수 중 비동기가 함수 가 없는지 확인하고 없으면 async 만들어주기 example) import asyncio from typing import Dict def not_data_sync(**data: Dict) -> Dict: return data async def main_function() -> int: data = not_data_sync({"test": "error"}) # ERROR!! return data asyncio.run(main_function())

반응형