Skip to content

deeptrack.generators submodule missing #389

@edhar98

Description

@edhar98

Hi DeepTrack team,

I'm encountering an ImportError when using deeptrack in my project, specifically related to the deeptrack.generators module.

Problem Description:
When wandb (which depends on pydantic for introspection) is imported in a script that also uses deeptrack, deeptrack's lazy_import mechanism attempts to load deeptrack.generators. This import fails with the following ImportError:
ImportError: deeptrack attempted to use a functionality that requires module deeptrack.generators, but it couldn't be loaded. Please install deeptrack and retry.

Upon investigating my deeptrack installation directory, and also checking the DeepTrack2 GitHub repository (Release 2.0.1), I've confirmed that the generators.py appears to be missing.

Steps to Reproduce:

  1. Perform a clean installation of deeptrack (e.g., pip install deeptrack).
  2. Attempt to run a Python script that includes both import deeptrack and import wandb.
    import deeptrack
    import wandb # This line causes the error

Expected Behavior:
The deeptrack.generators module should be present in the distributed package and the Git repository, allowing lazy_import to successfully load it when required, and thus not causing an ImportError.

Actual Behavior:
The deeptrack.generators module is missing from the installed package files and the Git repository, leading to a runtime ImportError when its lazy import is triggered.

Environment:

  • Operating System: Ubuntu 20.04.6 LTS
  • Python Version: 3.10.18
  • DeepTrack Version: 2.0.1
  • wandb Version: 0.21.0

Additional Context:
This issue prevents the use of deeptrack in environments where wandb (or other libraries performing module introspection) is also present.

I will upgrade to 2.1.0.0 version. Just wanted you to know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolvedThe issue has been resolved

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions