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

ImportError: Import by filename is not supported. #98

Open
thkatsou opened this issue Dec 2, 2020 · 0 comments
Open

ImportError: Import by filename is not supported. #98

thkatsou opened this issue Dec 2, 2020 · 0 comments

Comments

@thkatsou
Copy link

thkatsou commented Dec 2, 2020

on ubuntu 20.10 trying to import a python file on my mod_python project
SiteBuilder=apache.import_module('~/lib/core/SiteBuilder.py')

i get this error :

Mod_python error: "PythonHandler main"

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/mod_python/apache.py", line 356, in HandlerDispatch
log=debug)

File "/usr/local/lib/python2.7/dist-packages/mod_python/apache.py", line 633, in import_module
module = importlib.import_module(module_name)

File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)

File "/var/sites/kaotonik/main.py", line 3, in
SiteBuilder=apache.import_module('~/lib/core/SiteBuilder.py')

File "/usr/local/lib/python2.7/dist-packages/mod_python/apache.py", line 633, in import_module
module = importlib.import_module(module_name)

File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)

ImportError: Import by filename is not supported.

the project works on ubuntu 18.04

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

No branches or pull requests

1 participant