Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NameError: global name 'os' is not defined in FDMEE 11.1.2.4

paulehrFeb 8 2017 — edited Feb 13 2017

I am trying to write a Jython event script for the aftLoad event and one of issues i am running into is when i try and use os.path.join to build file paths I get the following error

NameError: global name 'os' is not defined

here is the snippet of code I am working with

import os

import shutil

### other stuff here ###

def copyAsiaFile(strPovLoc, strLoadID, strAsiaDatfile, strAsiaOutfile):

    strAsiaFile = os.path.join(strOutboxPath, strAsiaDatfile)

    strAsiaFileOut = os.path.join(strAsiaOutbox, strPovLoc, strAsiaOutfile)

    try:

        af = open(strAsiaFile)

        fdmAPI.logInfo('Found ASIAPlAN Load file: %s' % (strAsiaDatfile))

        fdmAPI.logInfo('Copying %s to %s' % (strAsiaDatfile, strAsiaOutfile))

        shutil.copyfile(strAsiaFile, strAsiaFileOut)

        fdmAPI.logInfo('Successfully moved: %s' % (strAsiaDatfile))

        af.close

    except Exception, e:

        print e

has anyone run into this before? Also is FDMEE using the jython libraries in \Oracle\Middleware\odi\oracledi.sdk\lib\Lib ?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2017
Added on Feb 8 2017
1 comment
439 views