|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi 2 all,
when i run it it gives me following error: "NameError: name 'process' is not defined." Can anybody look at it and tell me what is problem? Thanks. My script code is indented)import DataFile inpd1 = DataFile.ReadDataFile() out1pd = process(inpd1) #local function def process(inpd): outstream = mix( inpd.stream1 ) outpd = processdata() outpd.stream1 = outstream outpd.massflow = outstream.massflow outpd.pressure = outstream.pressure outpd.temperature = outstream.temperature outpd.components = outstream.components outpd.volume_flow = outstream.massflow / inpd.density_of_material return outpd DataFile.CreateDataFile(out1pd) DevHims |
|
#2
|
||||
|
||||
|
Next time, post your code within [code] and [/code] tags to indent it correctly. As to your specific bug, move the code for def process: above the line where you call process()
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
|
#3
|
|||
|
|||
|
Thanks man. It is working now. Next time i will make sure code it indented.
DevHims ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Basic Error -Need Help????? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|