[mapserver-users] Mapscript and Python problems

Rustam Kamberov rustam.kamberov at gmail.com
Thu Sep 22 13:20:41 EDT 2011


Hi everyone,

i have installed Mapserver, and downloaded Mapscript library for Python,
followed the official procedure.

I tested http://localhost:8080/cgi-bin/test-cgi-mapscript.py example. it
works perfectly. But when I try to import mapscript from Python IDLE, it
gives the error shown below:

>>> import mapscript

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import mapscript
  File "C:\Python26\lib\site-packages\mapscript.py", line 25, in <module>
    _mapscript = swig_import_helper()
  File "C:\Python26\lib\site-packages\mapscript.py", line 24, in
swig_import_helper
    return _mod
UnboundLocalError: local variable '_mod' referenced before assignment


It seem the problem in the mapscript.py code. I would appreciate if you give
me an advice what to do.

Thanks in advance,
Rustam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110922/220dc3db/attachment.html


More information about the mapserver-users mailing list