I am using Manifold 8, with the IronPython 2.6 distribution.

I've gotten Manifold to at least be able to run IronPython scripts (courtesy of http://www.georeference.org/Forum/t100925.11) by deleting the Scripts > Reference to IronMath.dll and changing the IronPython.dll reference to full file path.

However, despite being able to load up IronPython itself and import, say, urllib2 just fine, I can't do the same in Manifold. Instead I get:

Exception has been thrown by the target of an invocation. No module named urllib2 [sic]

At the same time, I can do import math and then junk like math.sqrt(), and if I don't import math then math.sqrt() throws an error. This and the fact that Manifold knows the error suggests that the software should be able to import modules, but I don't know why it can't get urllib2 or cmd or whatever.

I've tried adding a reference to IronPython.Modules.dll in references, as well as a bunch of other DLLs that are in the IronPython 2.6 folder.

Given how little stuff there is about Manifold on here I'm not hopeful about finding a positive answer, but who knows. Maybe someone out there will have an idea or relevant experience that might assist despite not knowing Manifold GIS specifically.


  • Being able to import some modules suggests you might have two Python installations, and when you've installed (say) urllib2 it only put it into one of the Python installs, not the one that Manifold is looking at... maybe? I am guessing, however, since I've never used it :) – Erica Feb 3 '15 at 20:29

Got an answer from the Manifold forums. My problem involved file paths.

Instead of:

def Main():
    import urllib2


I needed to do:

def Main():
    import sys
    sys.path.append('C:\Program Files (x86)\IronPython 2.6\Lib') # or wherever they are saved
    import urllib2


Answer courtesy of members of the Manifold forums. I posted this question there and got this answer, figured I'd copy it over here for this site's edification in the event anyone else has the same problem.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.