Module ‘wandb’ has no attribute ‘apis’

1.4k views Asked by At

I’m trying to use wandb in a project I’m running on a server via SSH. I created and configured the virtual environment, but with wandb, I’m encountering the error ‘module ‘wandb’ has no attribute ‘apis’’. The server is running Python 3.6.8 and has wandb-0.15.12 installed. However, when I use ‘wandb login’ or any other wandb command, it throws the error. Could anyone help me resolve this issue?

Traceback (most recent call last):
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/bin/wandb", line 5, in <module>
    from wandb.cli.cli import cli
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/__init__.py", line 27, in <module>
    from wandb import sdk as wandb_sdk
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/sdk/__init__.py", line 4, in <module>
    from .artifacts.artifact import Artifact  # noqa: F401
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/sdk/artifacts/artifact.py", line 36, in <module>
    from wandb.apis.normalize import normalize_exceptions
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/apis/__init__.py", line 44, in <module>
    from .public import Api as PublicApi  # noqa
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/apis/public.py", line 51, in <module>
    from wandb.sdk.launch.errors import LaunchError
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/sdk/launch/__init__.py", line 1, in <module>
    from ._launch import launch
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/sdk/launch/_launch.py", line 12, in <module>
    from .agent import LaunchAgent
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/sdk/launch/agent/__init__.py", line 1, in <module>
    from .agent import LaunchAgent
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/sdk/launch/agent/agent.py", line 15, in <module>
    from wandb.sdk.launch._launch_add import launch_add
  File "/home/tcouto/mestrado_andrey/psla/venv-psla/lib64/python3.6/site-packages/wandb/sdk/launch/_launch_add.py", line 5, in <module>
    import wandb.apis.public as public
AttributeError: module 'wandb' has no attribute 'apis'

I tried to reinstall and set it up in another virtual environment, but the same error keeps happening, and don't have any other file with that name inside the folder

1

There are 1 answers

0
Sanjar Karshiev On

Downgrade the wandb version to wandb==0.15.11