metacall/core

Bug: Python Cannot Automatically Import JavaScript Functions Without Explicitly Importing metacall

Closed this issue ยท 7 comments

๐Ÿ› Bug Report

In Python, when trying to import JavaScript functions, the import process fails unless we explicitly include import metacall at the top of the script. Without this explicit import, a "module not found" error occurs.

Expected Behavior

Python should be able to automatically import JavaScript functions without requiring the explicit inclusion of import metacall at the top of the script.

Current Behavior

Without writing import metacall at the beginning of the Python script, a "ModuleNotFoundError" is raised. If import metacall is added on top of the python script, the script work as expected.

Steps to Reproduce

In the Python script, do not include import metacall at the top.
Attempt to import and use JavaScript functions.
Observe the "ModuleNotFoundError."
  • Add import metacall at the top of the python script, and then It works smoothly.

Here is an example of the issue (see the screenshot below):

Screenshot 2024-12-17 004332

please assign this to me.

@vivekweb3 Sure, you can work on it. You can join our discord server as well to discuss.