Hi everyone,<br><br>i have installed Mapserver, and downloaded Mapscript library for Python, followed the official procedure.<br><br>I tested <a href="http://localhost:8080/cgi-bin/test-cgi-mapscript.py" target="_blank">http://localhost:8080/cgi-bin/test-cgi-mapscript.py</a> example. it works perfectly. But when I try to import mapscript from Python IDLE, it gives the error shown below:<br>
<br>>>> import mapscript<br><br><span style="color:rgb(255, 0, 0)">Traceback (most recent call last):</span><br style="color:rgb(255, 0, 0)"><span style="color:rgb(255, 0, 0)"> File "<pyshell#0>", line 1, in <module></span><br style="color:rgb(255, 0, 0)">
<span style="color:rgb(255, 0, 0)"> import mapscript</span><br style="color:rgb(255, 0, 0)"><span style="color:rgb(255, 0, 0)"> File "C:\Python26\lib\site-packages\mapscript.py", line 25, in <module></span><br style="color:rgb(255, 0, 0)">
<span style="color:rgb(255, 0, 0)"> _mapscript = swig_import_helper()</span><br style="color:rgb(255, 0, 0)"><span style="color:rgb(255, 0, 0)"> File "C:\Python26\lib\site-packages\mapscript.py", line 24, in swig_import_helper</span><br style="color:rgb(255, 0, 0)">
<span style="color:rgb(255, 0, 0)"> return _mod</span><br style="color:rgb(255, 0, 0)"><span style="color:rgb(255, 0, 0)">UnboundLocalError: local variable '_mod' referenced before assignment</span><br><br>
<br>It seem the problem in the mapscript.py code. I would appreciate if you give me an advice what to do.<br><br>Thanks in advance,<br><font color="#888888">Rustam</font>