Skip to content

Error importing kagglesdk #43

@tomwardio

Description

@tomwardio

We're getting import errors with the latest kagglesdk, which is transitively imported via kagglehub for our project

ERROR src/alphagenome_research/model/dna_model_test.py - ImportError while importing test module '/tmpfs/src/git/alphagenome_research/src/alphagenome_research/model/dna_model_test.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/[root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/_pytest/python.py:507](https://cs.corp.google.com/piper///depot/google3/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/_pytest/python.py?l=507&cl=921763242): in importtestmodule
    mod = import_path(
/[root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/_pytest/pathlib.py:587](https://cs.corp.google.com/piper///depot/google3/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/_pytest/pathlib.py?l=587&cl=921763242): in import_path
    importlib.import_module(module_name)
/[usr/local/.pyenv/versions/3.12.9/lib/python3.12/importlib/__init__.py:90](https://cs.corp.google.com/piper///depot/google3/usr/local/.pyenv/versions/3.12.9/lib/python3.12/importlib/__init__.py?l=90&cl=921763242): in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<frozen importlib._bootstrap>:1387: in _gcd_import
    ???
<frozen importlib._bootstrap>:1360: in _find_and_load
    ???
<frozen importlib._bootstrap>:1331: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:935: in _load_unlocked
    ???
/[root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/_pytest/assertion/rewrite.py:197](https://cs.corp.google.com/piper///depot/google3/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/_pytest/assertion/rewrite.py?l=197&cl=921763242): in exec_module
    exec(co, module.__dict__)
[src/alphagenome_research/model/dna_model_test.py:28](https://cs.corp.google.com/piper///depot/google3/src/alphagenome_research/model/dna_model_test.py?l=28&cl=921763242): in <module>
    from alphagenome_research.model import dna_model
[src/alphagenome_research/model/dna_model.py:60](https://cs.corp.google.com/piper///depot/google3/src/alphagenome_research/model/dna_model.py?l=60&cl=921763242): in <module>
    import kagglehub
/[root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/__init__.py:4](https://cs.corp.google.com/piper///depot/google3/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/__init__.py?l=4&cl=921763242): in <module>
    from kagglehub import colab_cache_resolver, http_resolver, kaggle_cache_resolver, registry
/[root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/colab_cache_resolver.py:5](https://cs.corp.google.com/piper///depot/google3/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/colab_cache_resolver.py?l=5&cl=921763242): in <module>
    from kagglehub.clients import ColabClient
/[root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/clients.py:22](https://cs.corp.google.com/piper///depot/google3/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/clients.py?l=22&cl=921763242): in <module>
    from kagglehub.cache import delete_from_cache, get_cached_archive_path
/[root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/cache.py:6](https://cs.corp.google.com/piper///depot/google3/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/cache.py?l=6&cl=921763242): in <module>
    from kagglehub.handle import CompetitionHandle, DatasetHandle, ModelHandle, NotebookHandle, ResourceHandle
/[root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/handle.py:6](https://cs.corp.google.com/piper///depot/google3/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglehub/handle.py?l=6&cl=921763242): in <module>
    from kagglesdk.kaggle_env import get_env, get_web_endpoint
E   ImportError: cannot import name 'get_web_endpoint' from 'kagglesdk.kaggle_env' (/root/.local/share/hatch/env/virtual/alphagenome-research/JTJ59Eni/hatch-test.py3.12/lib/python3.12/site-packages/kagglesdk/kaggle_env.py)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions