<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue-Light, Helvetica Neue Light, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_ym18_1_1458628394264_5417">Appreciate in advance any help rendered here.</div><div id="yui_3_16_0_ym18_1_1458628394264_5439">Please help me fix the issue with the deepzoom.wsgi. It seems to fail consistently.</div><div id="yui_3_16_0_ym18_1_1458628394264_5440"><br></div><div>I am trying to access svs images in a folder using openslide utilities.</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr">Followed the webpage: <a href="https://github.com/openslide/openslide/wiki/RunningDeepZoomServerOnApache" id="yui_3_16_0_ym18_1_1458628394264_4763">openslide/openslide</a></div><div style="width:450px; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';margin-top:5px; margin-bottom: 5px; background-color: #ffffff;" contenteditable="false" id="enhancrCard_0" class="link-enhancr-attachment link-enhancr-element richcompose-card"><table class="link-enhancr-element" cellspacing="0" cellpadding="0" border="0" style="width:450px; height:170px; position: relative; display: block;"><tbody><tr class="link-enhancr-element"><td class="link-enhancr-element" colspan="8" style="height: 1px; background-color: #e5e5e5; font-size: 1px; border-collapse: collapse;"><div class="link-enhancr-element" style="height: 1px; background-color: #e5e5e5; font-size: 1px; line-height:0px;"> </div></td></tr><tr class="link-enhancr-element"><td rowspan="5" class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 1pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 1pt;"> </div></td><td class="link-enhancr-element link-enhancr-image-wrap enhancr-image-crop" rowspan="5" style="vertical-align: middle; width: 168px; height: 168px; border-collapse: collapse; background-color: rgb(255, 255, 255);"><div class="link-enhancr-element" style="width: 168px;" align="center"><a href="https://github.com/openslide/openslide/wiki/RunningDeepZoomServerOnApache" class="link-enhancr-card-urlWrapper link-enhancr-element" style="text-decoration: none !important;text-decoration:none; color: #000000 !important;"><img alt="image" src="https://s.yimg.com/vv//api/res/1.2/pzfJCzWTpDhFGcGlJcwwtQ--/YXBwaWQ9bWFpbDtmaT1maWxsO2g9MTY4O3c9MTY4/https://avatars3.githubusercontent.com/u/359061?v=3&s=400.cf.jpg" class="link-enhancr-thumbnail-image link-enhancr-element yahoo-ignore-inline-image" width="168" height="168" style="display: block; margin: auto;" data-id="daacd9c2-4d80-ee7f-12b2-e146ea0b64af"></a></div></td><td rowspan="5" class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 1pt;"> </div></td><td rowspan="5" class="link-enhancr-element" style="width: 14px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 14px; background-color: #ffffff; font-size: 14pt;"> </div></td><td colspan="2" class="link-enhancr-element" style="height: 6px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="height: 6px; background-color: #ffffff; font-size: 6pt;"> </div></td><td rowspan="5" class="link-enhancr-element" style="width: 20px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 20px; background-color: #ffffff; font-size: 20pt;"> </div></td><td class="link-enhancr-element" rowspan="5" width="1" style="width: 1px; background-color: #e5e5e5; font-size: 1pt; border-collapse: collapse;"><div class="link-enhancr-element" style="width: 1px; background-color: #e5e5e5; font-size: 1pt;"> </div></td></tr><tr><td class="link-enhancr-element" colspan="2" style="width: 100%; vertical-align: middle; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';"><div class="link-enhancr-text-part link-enhancr-element" style="line-height:16.5px; background-color: #ffffff; height: 135px; width: 245px;"><div class="link-enhancr-element" style="word-wrap: break-word; word-break: break-all;"><span class="link-enhancr-element icon  icon-shrink link-enhancr-toggle"></span><span class="link-enhancr-element icon icon-close link-enhancr-delete"></span><a href="https://github.com/openslide/openslide/wiki/RunningDeepZoomServerOnApache" class="link-enhancr-card-urlWrapper link-enhancr-element" style="text-decoration: none !important;text-decoration:none; color: #000000 !important; line-height: 100%; font-size: 18px; display: block;"><span class="link-enhancr-element link-enhancr-card-title" style="margin: 0; font-weight: normal;margin-bottom: 3px; font-size: 18px; line-height: 21px; max-height: 43px; color: #000000; overflow: hidden !important; display: inline-block;">openslide/openslide</span></a><div style="font-size: 13px; line-height: 20px; color: #999999; max-height: 81px; font-family: 'Georgia', 'Times', 'Times New Roman', 'serif';overflow: hidden;" class="link-enhancr-card-description link-enhancr-element">openslide - C library for reading virtual slide images</div></div></div></td></tr><tr><td colspan="2" class="link-enhancr-element" style="height: 4px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="height: 4px; background-color: #ffffff; font-size: 4pt;"></div></td></tr><tr><td class="link-enhancr-element" style="vertical-align: middle; font-family: 'Arial', 'Helvetica Neue', 'Helvetica', 'sans-serif';"><div class="link-enhancr-element" style="font-size: 0pt;"><a href="https://github.com/openslide/openslide/wiki/RunningDeepZoomServerOnApache" class="link-enhancr-card-url link-enhancr-element" style="color: black; text-decoration: none !important;text-decoration:none;cursor:pointer !important;" target="_blank"><span class="link-enhancr-element link-enhancr-view-on" style="display: inline-block; line-height: 11px; max-width: 145px; min-width: 85px; overflow: hidden; max-height: 13px; word-break: break-all;" id="yui_3_16_0_ym18_1_1458628394264_4781"><span class="link-enhancr-element link-enhancr-mobile-no-resize" style="vertical-align:middle; font-size: 9px; line-height: 11px; color: #999999; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust:none; text-size-adjust:none;">View on <span style="font-weight: bold" class="link-enhancr-view-on-domain">github.com</span></span></span></a></div></td><td class="link-enhancr-element" style="vertical-align: middle; width: 100px; font-family: 'Arial', 'Helvetica Neue', 'Helvetica', 'sans-serif';"><div class="link-enhancr-element link-enhancr-preview-wrapper" style="max-width: 100px; min-width: 80px; overflow: hidden; text-align: right; line-height: 11px; max-height: 13px; font-size: 0pt;"><span class="link-enhancr-element link-enhancr-preview-by link-enhancr-mobile-no-resize" style="vertical-align:middle; font-size: 9px; line-height: 11px; color: #999999; -moz-text-size-adjust: none; -ms-text-size-adjust: none; -webkit-text-size-adjust:none; text-size-adjust:none;">Preview by Yahoo</span></div></td></tr><tr><td colspan="2" class="link-enhancr-element" style="height: 9px; background-color: #ffffff; font-size: 0pt; border-collapse: collapse;"><div class="link-enhancr-element" style="height: 9px; background-color: #ffffff; font-size: 9pt;"></div></td></tr><tr class="link-enhancr-element"><td class="link-enhancr-element" colspan="8" style="height: 1px; background-color: #e5e5e5; font-size: 1px; border-collapse: collapse;"><div class="link-enhancr-element" style="height: 1px; background-color: #e5e5e5; font-size: 1px; line-height:0px"> </div></td></tr></tbody></table></div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr">I have compiled mod_wsgi successfully using VC14 and Python 3.5, Apache 2.4.18</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr">I have verified my Apache configurations for mod_wsgi works fine...</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr"><br></div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr">My deepzoom.wsgi file is:</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr">------</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr" class="">import os, sys</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr" class="">path = 'C:/Apache24/htdocs/openslide/deepzoom_server.py'</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr" class=""><br id="yui_3_16_0_ym18_1_1458628394264_4997" class=""></div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr" class="">if path not in sys.path: sys.path.append(os.path.dirname(path))</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5001" class=""></div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr" class="">from deepzoom_server import app as application</div><div id="yui_3_16_0_ym18_1_1458628394264_4765" dir="ltr" class="">application.config.update({'SLIDE_DIR':'C:/DATA/IMAGES/DIR','DEBUG': True,})<br></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5008" class=""></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">-------</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">Added the following to httpd.conf</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">-------</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5087" class=""></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><VirtualHost *:8000></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_ym18_1_1458628394264_5091">    </span>ServerName wsgihost</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    DocumentRoot C:/Apache24/htdocs/openslide</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    WSGIScriptAlias /wsgi C:/Apache24/htdocs/openslide/wsgi_handler.wsgi<br></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    WSGIScriptAlias /deepzoom C:/Apache24/htdocs/openslide/deepzoom.wsgi</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""></VirtualHost></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5101" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5103" class=""></div></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">-------</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">I have no issues when I go to <a href="http://localhost:8000/wsgi" id="yui_3_16_0_ym18_1_1458628394264_5273">http://localhost:8000/wsgi</a></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">-------</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">Sample WSGI code is:</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">import os, sys</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5356" class=""></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">def application(environ, start_response):</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    status = '200 OK'</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out0 = b'sys.platform = %s\n' % bytes(repr(sys.platform), 'utf-8')</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out1 = b'sys.version = %s\n' % bytes(repr(sys.version), 'utf-8')</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out2 = b'sys.prefix = %s\n' % bytes(repr(sys.prefix), 'utf-8')</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><span class="" style="white-space:pre-wrap;" id="yui_3_16_0_ym18_1_1458628394264_5364">     </span></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out3_1 = b'sys.path = \n' </div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    path = os.path.dirname('C:/Apache24/htdocs/openslide/deepzoom_server.py')</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    if path not in sys.path: sys.path.append(path)</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    #out3 = b'sys.path = %s\n' % bytes(repr(sys.path), 'utf-8')</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out3 = bytes(('--\n  '.join(sys.path)),'utf-8')</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out3_2 = b'\n' </div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5373" class=""></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out4_1 = b'sys.modules = \n' </div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out4 = b'sys.modules = %s\n' % bytes(repr(sys.modules), 'utf-8')</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    #out4 = bytes(('--\n  '.join(sys.modules)),'utf-8')</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    out4_2 = b'\n' </div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5380" class=""></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    output = b'%s%s%s%s%s%s%s%s%s' % (out0,out1,out2,out3_1,out3,out3_2,out4_1,out4,out4_2)</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))]</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    </div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    start_response(status, response_headers)</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    </div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    return [output]</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5388" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5390" class=""></div></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">-------</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">I am getting a server error when I execute <a href="http://localhost:8000/deepzoom" id="yui_3_16_0_ym18_1_1458628394264_5139">http://localhost:8000/deepzoom</a></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">The error_log of Apache has these entries...</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">-------</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">mod_wsgi (pid=12664): Target WSGI script 'C:/Apache24/htdocs/openslide/deepzoom.wsgi' cannot be loaded as Python module.</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">mod_wsgi (pid=12664): Exception occurred processing WSGI script 'C:/Apache24/htdocs/openslide/deepzoom.wsgi'.</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">Traceback (most recent call last):\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "C:/Apache24/htdocs/openslide/deepzoom.wsgi", line 6, in <module>\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    from deepzoom_server import app as application\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "C:/Apache24/htdocs/openslide\\deepzoom_server.py", line 23, in <module>\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    import openslide\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "<frozen importlib._bootstrap>", line 969, in _find_and_load\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "C:\\Users\\myself\\AppData\\Local\\Programs\\Python\\Python35\\lib\\site-packages\\openslide_python-1.1.0-py3.5-win-amd64.egg\\openslide\\__init__.py", line 29, in <module>\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    from openslide import lowlevel\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "<frozen importlib._bootstrap>", line 969, in _find_and_load\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "C:\\Users\\myself\\AppData\\Local\\Programs\\Python\\Python35\\lib\\site-packages\\openslide_python-1.1.0-py3.5-win-amd64.egg\\openslide\\lowlevel.py", line 39, in <module>\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    _lib = cdll.LoadLibrary('libopenslide-0.dll')\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "C:\\Users\\myself\\AppData\\Local\\Programs\\Python\\Python35\\Lib\\ctypes\\__init__.py", line 425, in LoadLibrary\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    return self._dlltype(name)\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">  File "C:\\Users\\myself\\AppData\\Local\\Programs\\Python\\Python35\\Lib\\ctypes\\__init__.py", line 347, in __init__\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">    self._handle = _dlopen(self._name, mode)\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">OSError: [WinError 193] %1 is not a valid Win32 application\r</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5224" class=""><br id="yui_3_16_0_ym18_1_1458628394264_5226" class=""></div></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">-------</div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class=""><br></div><div dir="ltr" id="yui_3_16_0_ym18_1_1458628394264_5006" class="">Regards - RR</div></div></body></html>