Skip to content

ModuleNotFoundError: No module named 'MyIndex'  #472

Open
@Bragegs

Description

@Bragegs

When using the CelerySignalProcessor we call registry_delete_task.

       @shared_task()
        def registry_delete_task(doc_label, data):
            doc_instance = import_module(doc_label)
            parallel = True
            doc_instance._bulk(bulk_data, parallel=parallel)

The parameter doc_label is one of my documents("MyIndex")

@registry.register_document
class MyIndex(Document):

The below line from registry_delete_task throws ModuleNotFoundError: No module named 'MyIndex' because MyIndex is not a module.

import_module('MyIndex')

sub issue: There exists a PR here to fix data parameter and rename it to what seems to be the correct name "bulk_data".. The bottom line of the function uses a variable(bulk_data) that does not exist in the function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions