cannot find module 'ext.slugs' (No module named 'ext') #7242
-
I am following the doc to create an extension to change the slug format. I created the ext/ directory with the init.py. And still I get this error:
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hello @pitosalas, python -c "import sys; print(*sys.path, sep='\n')" to check what directories are in your python interpreter path. You can add your current directory with |
Beta Was this translation helpful? Give feedback.
-
Thanks, it worked! But I always thought that . was the first place where python looks? Can you help me understand? Thanks!
… On Jun 4, 2024, at 10:41 AM, Kamil Krzyśków ***@***.***> wrote:
Hello @pitosalas,
you can run:
python -c "import sys; print(*sys.path, sep='\n')"
to check what directories are in your python interpreter path.
You can add your current directory with export PYTHONPATH=. on a UNIX-like terminal.
Note that . adds every "current directory" so watch out for name conflicts, but overall didn't happen to me yet despite working in many MkDocs projects.
You can also add an absolute path.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
And if I can add a question: I am building my site in a github action. How would I achieve the same thing there?
Thanks!
… On Jun 4, 2024, at 12:20 PM, Pito Salas ***@***.***> wrote:
Thanks, it worked! But I always thought that . was the first place where python looks? Can you help me understand? Thanks!
> On Jun 4, 2024, at 10:41 AM, Kamil Krzyśków ***@***.***> wrote:
>
>
> Hello @pitosalas,
> you can run:
> python -c "import sys; print(*sys.path, sep='\n')"
> to check what directories are in your python interpreter path.
> You can add your current directory with export PYTHONPATH=. on a UNIX-like terminal.
> Note that . adds every "current directory" so watch out for name conflicts, but overall didn't happen to me yet despite working in many MkDocs projects.
> You can also add an absolute path.
> —
> Reply to this email directly, view it on GitHub, or unsubscribe.
> You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hello @pitosalas,
you can run:
python -c "import sys; print(*sys.path, sep='\n')"
to check what directories are in your python interpreter path.
You can add your current directory with
export PYTHONPATH=.
on a UNIX-like terminal.Note that
.
means every "current directory" at any given path, so watch out for name conflicts, but overall didn't happen to me yet despite working in many MkDocs projects.You can also add an absolute path.