AffableHoneyBadger
AffableHoneyBadger
MModular
Created by Hammad Ali on 8/6/2024 in #questions
Error while importing local python file
Awesome! 👍
6 replies
MModular
Created by Hammad Ali on 8/6/2024 in #questions
Error while importing local python file
6 replies
MModular
Created by Hammad Ali on 8/6/2024 in #questions
Error while importing local python file
@Hammad Ali Have you tried adding the absolute path? I'm also not sure you need the .py on the end of module name. So something like:
from python import Python

fn main() raises:
Python.add_to_path("/the/path/to/module/")
var module = Python.import_module("python_curl")
from python import Python

fn main() raises:
Python.add_to_path("/the/path/to/module/")
var module = Python.import_module("python_curl")
6 replies