I got this error:
import wandb
...
Traceback (most recent call last):
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/requests/compat.py", line 11, in <module>
import chardet
ModuleNotFoundError: No module named 'chardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/afs/cs.stanford.edu/u/brando9/ultimate-utils/ultimate-utils-proj-src/uutils/__init__.py", line 52, in <module>
from uutils.logging_uu.wandb_logging.common import setup_wandb
File "/afs/cs.stanford.edu/u/brando9/ultimate-utils/ultimate-utils-proj-src/uutils/logging_uu/wandb_logging/common.py", line 8, in <module>
import wandb
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/wandb/__init__.py", line 26, in <module>
from wandb import sdk as wandb_sdk
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/wandb/sdk/__init__.py", line 3, in <module>
from . import wandb_helper as helper # noqa: F401
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/wandb/sdk/wandb_helper.py", line 6, in <module>
from .lib import config_util
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/wandb/sdk/lib/config_util.py", line 10, in <module>
from wandb.util import load_yaml
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/wandb/util.py", line 49, in <module>
import requests
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/requests/__init__.py", line 45, in <module>
from .exceptions import RequestsDependencyWarning
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/requests/exceptions.py", line 9, in <module>
from .compat import JSONDecodeError as CompatJSONDecodeError
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/requests/compat.py", line 13, in <module>
import charset_normalizer as chardet
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/charset_normalizer/__init__.py", line 23, in <module>
from charset_normalizer.api import from_fp, from_path, from_bytes, normalize
File "/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/charset_normalizer/api.py", line 10, in <module>
from charset_normalizer.md import mess_ratio
File "charset_normalizer/md.py", line 5, in <module>
ImportError: cannot import name 'COMMON_SAFE_ASCII_CHARACTERS' from 'charset_normalizer.constant' (/lfs/ampere1/0/brando9/miniconda/envs/data_quality/lib/python3.10/site-packages/charset_normalizer/constant.py)
(data_quality) brando9~ $ pip install chardet
Collecting chardet
Downloading chardet-5.1.0-py3-none-any.whl (199 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.1/199.1 kB 7.7 MB/s eta 0:00:00
Installing collected packages: chardet
Successfully installed chardet-5.1.0
why? seems odd. Thought this fixed it it seems:
pip install --upgrade pip
pip install chardet # might be needed if wandb acts weird