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">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>&gt;&gt;&gt; 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 &quot;&lt;pyshell#0&gt;&quot;, line 1, in &lt;module&gt;</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 &quot;C:\Python26\lib\site-packages\mapscript.py&quot;, line 25, in &lt;module&gt;</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 &quot;C:\Python26\lib\site-packages\mapscript.py&quot;, 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 &#39;_mod&#39; 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>Rustam<br>