Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'MyIndex' #472

Open
Bragegs opened this issue Feb 1, 2024 · 0 comments · May be fixed by #473
Open

ModuleNotFoundError: No module named 'MyIndex' #472

Bragegs opened this issue Feb 1, 2024 · 0 comments · May be fixed by #473

Comments

@Bragegs
Copy link

Bragegs commented Feb 1, 2024

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.

@Bragegs Bragegs linked a pull request Feb 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant