본문 바로가기

반응형

Error and Solve

(51)
[에러 해결] TypeError: 'type' object is not subscriptable / python version을 올리는게 제일 좋다 TypeError: 'type' object is not subscriptable  locations: dict[str, float] = { "z": -1.38, 'anotherkey': .....locations: dict[str, float] = { "z": -1.38, 'anotherkey': ..... 위와 같은 dict[str, float]에서 Type object is not subscriptable 에러가 났다 찾아보니까 3.8버전의 파이썬까지는 위와 같은 type을 automatic하게 알아듣는 기능이 구현 안되어 있다고 한다.      python 3.9 이상으로 upgrade 현재 python 3.8을 사용하고 있는데, 이문제를 해결하기 위한 가장 쉬운 방법은 env를 3.9이상으로 다..
[오류 해결] ValueError: numpy.dtype size changed, may indicate binary incompatibility. / pip install numpy==1.26.4 오류 해결: ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject  ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject  Value error가 났다.      numpy version 변경 본래 numpy version이 2.0.1 꽤 높았는데  pip install numpy==1.26.4 numpy version을 낮췄다.  그리고 쥬피터 노트북을 쓴다면 kernel을 ..
[에러 해결] ERA5 dataset 다운 받을 때 API 설정 때 404 에러가 뜨면 / api url을 변경해야 한다 climate ERA5 데이터셋 활용  import cdsapidataset = "reanalysis-era5-single-levels"request = { "product_type": ["reanalysis"], "data_format": "grib", "download_format": "unarchived"}client = cdsapi.Client()client.retrieve(dataset, request).download()  climate dataset을 다운받으려고 했다 위와 같은 코드를 활용하면 되는데, 계속 404 url 에러가 났다    https://microsoft.github.io/aurora/example_era5.html Example: Predictions fo..
[에러 해결] SSLCertVerificationError max entries exceed with url / verify=False 에러 SSLCertVerificationError requests package를 쓰는 client에서 오류  ---------------------------------------------------------------------------SSLCertVerificationError                  Traceback (most recent call last)생략.. site-packages/cads_api_client/api_client.py:69: UserWarning: HTTPSConnectionPool(host='cds-beta.climate.copernicus.eu', port=443): Max retries exceeded with url: /api/catalogue/v1/m..
[에러 해결] error: subprocess-exited-with-error / 하나하나씩 설치하기 에러: pip subprocess error   Pip subprocess error:  error: subprocess-exited-with-error    × Getting requirements to build wheel did not run successfully.  │ exit code: 1  ╰─> [42 lines of output]      reading from setup.cfg...       Conda 환경을 설치하는 도중 pip subprocess error가 나타났다. 원인 분석을 위해 한번에 environment.yaml 파일을 활용하지 않고 필요한 패키지를 단계별로 설치해보았다       에러 해결 패키지 제대로 쓰기  conda create -n envname python=3..
[오류 해결] ModuleNotFoundError: No module named 'huggingface_hub.constants' / pip install transformers, hugginface-hub 오류 ModuleNotFoundError: No module named 'huggingface_hub.constants' diffusers/utils/constants.py", line 17, in     from huggingface_hub.constants import HF_HOMEModuleNotFoundError: No module named 'huggingface_hub.constants'  ModuleNotFoundError: No module named 'huggingface_hub.constants'huggingface_hub 패키지에서 no module error가 났다     transformers, hugginface-hub 패키지 재설치 먼저 transformer 버전을 수정했다  ..
[에러 해결] ImportError: cannot import name 'HF_HOME' from 'huggingface_hub.constants' (huggingface_hub/constants.py) 오류 ImportError: cannot import name 'HF_HOME' from 'huggingface_hub.constants' (huggingface_hub/constants.py)   ImportError: cannot import name 'HF_HOME' from 'huggingface_hub.constants' (huggingface_hub/constants.py)  Huggingface_hub 패키지를 쓸 때 오류가 났다     2.   원래 huggingface-hub 패키지는 0.17.3 huggingface-hub==0.21.2로 업그레이드 시켰더니 해결되었다   pip install huggingface-hub==0.21.2   위와 같은 tokenizers 패키지 warni..
[에러 해결] 높은 버전의 pip 패키지 까는 법 / pip config set global.index-url https://pypi.org/simple 높은 버전 pip  까는 법 pip config set global.index-url https://pypi.org/simple
[에러 해결] hint: You have divergent branches and need to specify how to reconcile them. / git config pull.rebase true hint: You have divergent branches and need to specify how to reconcile them.  hint: You have divergent branches and need to specify how to reconcile them.you can do so by running one of the following commands sometime before your next pull... 해당 브랜치에서 remote branch에서 업데이트된 내용을 local branch에 가져오려고 'git pull' 또는 'git fetch'를 할 때 이런 에러가 날 때가 있다.     해당 에러는 로컬 브랜치에서 아직 변경한 내용이 남겨져서 그럴 수도 있다     해결: ..
[코드] matplotlib에서 marker 마커로 scatter plot하기 / 성능 그래프 피겨 figure 1. 가장 간단한 matplotlib with scatter plot  import matplotlib.pyplot as plt# Example Datax = [10, 20, 30, 40, 50, 60]y = [10, 30, 20, 50, 70, 80]labels = ['Method A', 'Method B', 'Method C', 'Method D', 'Method E', 'Method F']categories = ['Classic', 'Machine Learning', 'Self-Supervised', 'Externally Guided', 'Externally Guided', 'Machine Learning']colors = ['green', 'blue', 'orange', ..

반응형