Start a new topic

Import Random Error in Suite13 Creator Script.

Original Post by: Fri May 6 08:07:50 2016


import random

class indent:


def PrintNodeSelectPre (db, parent, rec, i):

if (mgGetCode(rec) == fltPolygon):

attList = mgGetAttList(rec, fltPolyTexmap)


if (attList != -1):



print "Material id =",tmp

mgSetAttList (rec, fltPolyMaterial, tmp)

mgSetPolyColorRGB(rec,255, 255, x)

return MG_TRUE

Its returning error : E: ImportError: No module named random

print sys.path shows -> ['C:\\Presagis\\Suite13\\Creator\\bin', 'C:\\Program Files (x86)\\ArcGIS\\bin', 'C:\\Presagis\\Suite13\\Creator\\bin\\', '', 'C:\\Presagis\\Suite13\\Creator\\bin']

Anyway to solve this? i reinstalled Python2.7. And i'm not able to locate "" as mentioned in above path.

1 Comment

Original Post by: SteveThompson Fri May 6 16:43:14 2016

Sounds like your Python installation may not have set things up correctly for you on your system.

Can you check the value of the environment variable PYTHONPATH? It should include the lib folder of the Python installation. BTW, the PATH environment variable is not used by Python to locate modules. It is PYTHONPATH that is the important env var.

Let us know what you find out.

BTW, are you running inside or outside of Creator?

Login to post a comment