module not found in IIS virtual dir

P

Peter Maas

I'm trying to call python scripts from IIS in the following tree:

upgrade/
util/
__init__.py
logonUser.py
select/
selectFiles.py

- select/ is referred from IIS as a virtual dir vselect.

- upgrade/ is inserted into the Python path via .pth file in
.../site-packages.

- selectFiles.py has a line "from util import logonUser".

If I run selectFiles.py from the command line everything is ok. But
if I call it via IIS (http://localhost/vselect/selectFiles.py) there
is an error "No module named util" due the fact that selectFiles.py
still sees upgrade/ in the Python Path but upgrade/util/logonUser.py
can no longer be found by selectfiles.py (os.path.exists returns
false). This is strange because other modules, e.g. odbc.py are still
importable. Hope you can help me. Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,017
Latest member
GreenAcreCBDGummiesReview

Latest Threads

Top