trueagi-io / hyperon-experimental

MeTTa programming language implementation
https://metta-lang.dev
MIT License
133 stars 44 forks source link

Fixing erroneous error in Python module format loader, when explicit path is specified #616

Closed luketpeterson closed 5 months ago

luketpeterson commented 5 months ago

When I designed the FsModuleFormat trait, I imagined it would always generate its own filesystem paths, so I didn't validate them in the try_path method. However I later changed it so the user can supply explicit paths, e.g. through the register-module! operation.

So I added the necessary validation code so that the python format loader doesn't try (and fail) to load a non-python module.