Error: Import module XLRD in a custom script FDMEE

Hello Experts,

I'm trying to import a python "xlrd" module in a custom Script FDMEE. But he doesn't always lift error "No Module name xlrd".

I tried to import the module by changing the path sys:

Here is the code I tried:

===========================================================================================

import sys

"custModlePath = r'fdmContext ["INBOXDIR"] +"\\Excel_Sample\\xlrd""

sys. Path.Append (custModlePath)

import xlrd

path = fdmContext ["INBOXDIR"] + "\\Excel_Sample\\."

pathout = fdmContext ["INBOXDIR"] + "\\Excel_Sample\\Out."

Book = xlrd.open_workbook (path)

data_sheet = book.sheet_by_name ("Report")

#data_sheet = book.sheet_by_index (3)

start_row_count = 7

end_row_count = data_sheet.nrows

MyFile = open (fdmContext ["INBOXDIR"] + "\\Excel_Sample\\Out\\mapping.csv",'w")

#myfile = open('SG\OUT\mapping.txt','w')

all in start_row_count < end_row_count:

#print data_sheet.row_values (i)

lines = data_sheet.row_values (start_row_count)

for the line data_sheet.row_values (start_row_count):

MyFile.Write (STR (Line))

MyFile.Write(",")

MyFile.Write ("\n")

start_row_count = start_row_count + 1

MyFile.Close)

=============================================================================================

ERROR:

2016-01-27 01:18:11, 294 FATAL [AIF]: error in CommProcess.executeCustomScript

Traceback (most recent call changed):

File "< string >", line 191, in executeCustomScript

File '< string >", line 486, in executeCustomScript

Folder "< string >", line 528, in executeJythonScript

File "E:\FDMEE/data/scripts/custom/EXCEL_TO_CSV.py", line 6, < module >

import xlrd

ImportError: No module named xlrd

2016-01-27 01:18:11, 336 DEBUG [AIF]: the connection of fdmAPI was closed.

===========================================================================================

Appreciate your help!

Thank you

Ishti

Hello

I was able to get it working after some changes.

Version compatible with Jython 2.5.1 FDMEE xlrd is xlrd 0.7.4

Xlrd record is required to be placed inside the FDMEE server and the path is required to be updated in the script.

Below the script just in case someone needs it:

===============================================================================================

import sys

custModlePath = fdmContext ["INBOXDIR"] + "\\Excel_Sample" # path in which is placed the folder xlrd

sys. Path.Append (custModlePath)

import xlrd

path = fdmContext ["INBOXDIR"] + "\\Excel_Sample\\Mapping.xls" # path to the Source file

pathout = fdmContext ["INBOXDIR"] + "\\Excel_Sample\\Out\\" # path to the .csv file

Book = xlrd.open_workbook (path)

data_sheet = book.sheet_by_name ("Report")

start_row_count = 7

end_row_count = data_sheet.nrows

MyFile = open (pathout + "mapping.csv", "w" ")

everything start_row_count<>

lines = data_sheet.row_values (start_row_count)

for the line data_sheet.row_values (start_row_count):

MyFile.Write (STR (Line))

MyFile.Write(",")

MyFile.Write ("\n")

start_row_count = start_row_count + 1

MyFile.Close)

=====================================================================================================

Thank you

Ishtique

Tags: Business Intelligence

Similar Questions

  • Call the Essbase Calc of custom Script FDMEE script

    Hi Experts,

    In my reuirement, I must run Essbase calc script to export the perticular accounts data and then import these data into FDMEE to load in another planning application.

    I know we can run the Application Esbase calc script fromTarget page and after load. but in my case, executing the script should happen prior to importation.

    Aanybody may suggest an example if I can call the script to calc Essbase to a custom event BefImport script or FDMEE script? an example of the syntax would be useful

    Thank you!

    Hello

    are what version of FDMEE you?

    You have an example document to support FDMEE sample scripts (Doc ID 1613836.1)

    You can have a MAXL command in your batch file to perform the extract

    Example 5

    An example script to calc to perform an Essbase excerpt and then load the file extracted with FDMEE.

    1. Create a batch (.bat) file that performs extract Essbase.
    2. Call the scriptimport BefImport event operating system batch file
      import of subprocesses
      Import shutil
      OS.chdir ("D:\temp\\BatchFiles")
      command = ' D:\temp\BatchFiles\helloworld.bat > helloworld.out '
      p = subprocess. Popen (Command)
      RETCODE = p.wait)
    3. Load using FDMEE HelloWorld.out

    The Jython script can be created in the BefImport Script.

    Then you can have a rule of data loading with a file in it name (Ex: Essbase_Extract_XXXX) where XXXX is that five-year period.

    Your jython script should create this file, so in the case of import, the data is imported

    Keep in mind that it is an output of feature 11.1.2.4 box so if you are in 11.1.2.3.x I wouldn't put a lot of effort in a complex solution

    I hope that this puts you on the right track

  • Error changing modules, no imports cannot option under edit?

    Have not be able to start Lightroom Dungeon error changing modules. I reinstalled bright room, tried to change the permissions, trashing preferences.  Repair preferences I tried, I changed today still operating system to Maverick. I'm on a Mac mini, please help.

    OK, well finally had righted things. It is a week long event. You would think that it would be easier. the reason why my LR5 became error Module was because the program permissions were not set right. If you want to try this solution here is the map

    Open finder

    in main menu, select go > go to folder

    Enter the folder Support

    under bottom of sharing and permissions right click on the lock to open the lock

    then change all these names for reading and writing

    then lock and restart LR

    If who disobeys there is another folder to change

    Follow the same map as above, but this time type

    ~ support folder

    WAIT, I forgot some steps

    After you type application Support

    Right-click on the adobe folder

    and select information

    then unlock so that you can change the permissions, change them and then

    the most important part!

    Click on the gear icon

    and apply the changes

    then re lock and re start LR

    unlock and change all names to read the lock write and try again LR.

    that has solved the problem of "error trying to change modules".

    hope this can help someone

    THANKS to all who tried to help!

    art

  • PowerCLI 6.0R2 bug with Import-Module-prefix?

    Yesterday I installed a couple of nine Win2012R2 servers and of course installed PowerCLI 6.0R2.

    In order to avoid multiple commands with the same name, we use the--Prefix setting for the modules. It worked great in R1 but I am facing problems with R2.

    Load the modules with code below:

    $VMwareModules = 'VMware.VimAutomation.Core', 'VMware.VimAutomation.Vds'

    foreach ($Module in $VMwareModules) { }

    if (! (Get-Module | ? {$_. (({Name -eq $Module})) {}

    Try {

    Import-Module -Nom $Module -Prefix "VMW"

    }

    Catch {

    $ErrorMessage = $_ . Exception. Message

    breaking

    }

    }

    }


    When running Get-Module now the modules but show the Basic module shows all ExportedCommands (which he did in R1).

    Basic modules shows too, now that 'script' instead of 'manifesto', as in R1.

    Not sure if this has anything to do with this.


    If we compare the number of orders 'Raphael' in R1 and R2, missing 300 orders for the Basic module in R2.


    Is this a bug? Is there a solution?


    R2:

    PS C:\ > get-module

    Version of Moduleinfo name ExportedCommands

    ---------- -------    ----                                ----------------

    Script Initialize-VMware_VimAutomation_Vds 0.0

    Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...}

    Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, add-Type, Clear-Variable, Compare-Object...}

    VMware.VimAutomation.Core script 6.0.0.0

    Clear VMware.VimAutomation.Sdk 6.0.0.0

    6.0.0.0 binary VMware.VimAutomation.Vds {add-VDSwitchPhysicalNetworkAdapter, add-VDSwitchVMHost, E...

    PS C:\ > get-vitoolkitversion

    PowerCLI Version

    ----------------

    VMware vSphere PowerCLI 6.0 Release 2 build 3056836

    ---------------

    Component versions

    ---------------

    VMWare AutoDeploy PowerCLI component 6.0 build 2358282

    VMWare ImageBuilder PowerCLI component 6.0 build 2358282

    VMware vSphere PowerCLI component 6.0 build 3052101

    VDS's VMware PowerCLI component 6.0 build 3052101


    PS C:\ > (get-command * vmw *) .count

    33


    R1:

    PS C:\ > get-module

    Version of Moduleinfo name ExportedCommands

    ---------- -------    ----                                ----------------

    Script Initialize-VMware_VimAutomation_Vds 0.0

    Manifest 3.1.0.0 Microsoft.PowerShell.Management {Add-Computer, Add-Content, Checkpoint-Computer, Clear-Con...}

    Manifest 3.1.0.0 Microsoft.PowerShell.Utility {Add-Member, add-Type, Clear-Variable, Compare-Object...}

    VMware.VimAutomation.Core manifesto 6.0.0.0 {Add-PassthroughDevice, add VirtualSwitchPhysicalNetworkAd... }

    Clear VMware.VimAutomation.Sdk 6.0.0.0

    6.0.0.0 binary VMware.VimAutomation.Vds {add-VDSwitchPhysicalNetworkAdapter, add-VDSwitchVMHost, E...

    PS C:\ > get-vitoolkitversion

    PowerCLI Version

    ----------------

    VMware vSphere PowerCLI 6.0 Release 1 build 2548067

    ---------------

    Component versions

    ---------------

    VMWare AutoDeploy PowerCLI component 6.0 build 2358282

    VMWare ImageBuilder PowerCLI component 6.0 build 2358282

    License of VMware PowerCLI component 6.0 build 2315846

    VMware vSphere PowerCLI component 6.0 build 2548068

    VDS's VMware PowerCLI component 6.0 build 2548068

    PS C:\ > (get-command * vmw *) .count

    12 p

    Hello

    First of all, I must say that you are right. This is a regression introduced in 6.0 R2 caused by updates in the manifesto of the module which target to attack another bug. Let me give you more explanation in detail on the specifics of the module VMware.VimAutomation.Core.

    Binary VMware.VimAutomation.Core is always snap-in in 6.0 R1, 6.0R2 and 6.0 R3. Which is related to internal constraints that will be overcome in the next version and the binary file is converted to module as it should.

    As binary VMware.VimAutomation.Core is pluggable PowerCLI makes it look like a module declaring a manifest module which load the snap and load so its commands to load this module 'false '. The VMWare.VimAutomation.Core module so manifest module powershell that refer to a script that loads the binary VMWare.VimAutomation.Core snap. Script files, the manifesto and that loads the snap are in the module folder: '\Modules\VMware.VimAutomation.Core '.

    Now the problem you face is that, in 6.0R1, the script that loads the snap was referenced in NestedModules module manifest, which means that all orders imported as nested module are imported into the scope of the module session. This makes the component controls snap to consider as a command module and that's why your use case has worked with 6.0R1. The problem with this is that if someone calling Remove-Module command for this module it deletes the orders of the current session, and if Import-Module is called again in the same session, that it will fail with an error "The VMware.VimAutomation.Core is already added," so no commands are loaded once the module is removed from the current session. Because of this bug, we decided not to reference the script component snap load in NestedModules but in ModulesToProcess of the module manifest. When it is referenced in the ModulesToProcess that makes the script commands to be loaded in the scope of global session which means that these commands are removed from the session when Remove-Module is called and if Import-Module is called once again he will not fail because the module manifest try again to load the sanp-in. When the controls are respectively in the context that they are not affected by the specification of modules and that is why they cannot be imported with the desired prefix you want.

    To be honest we didn't know this side effect when we discussed the initial bug with Remove-Module. All these problems will be solved in the next PowerCLI release when binary VMware.VimAutomation.Core will become the module. Until then, I suggest you workaround with fixation of the VMWare.VimAutomation.Core manifest file. To do this you have need open and change of \Modules\VMware.VimAutomation.Core\VMware.VimAutomation.Core.psd1

    the following way:

    1. set ModuleToProcess on a string is empty

    2. put NestedModules to @('VMware.VimAutomation.Core.ps1')

    This will make the module to behave in the same way as 6.0R1

    Kind regards

    Dimitar Milov

  • Error startup Module attempts to access a secure API

    I had all three keys to blackbeery site and I managed to import them in eclipse...

    But when I run the application in the device. His displays this "Error Starting Module attempts to access a secure API".

    Can someone suggest how to solve this problem. Please help me for this. Thanks in advance.

    sign the application

  • Problem with the 2007 Hallmark card studio deluxe installation and get error message "Error 1904.Module that cannot save c:\windows\syswow64\msxml4dll".

    Original title: 1904.Module error cannot save C:\windows\SysWOW64\msxml4dll. HRESULT 2147023782 contact your support staff

    I want to install hallmark card studio deluxe 2007 and I got this message

    C:\windows\SysWOW64\msxml4dll Error 1904.module cannot save. HRESULT 2147023782 contact your support staff.

    Someone knows how to fix this?

    Thank you

    Hi Roman,.

    Thanks for posting in Microsoft Community!

    It seems that you have a problem with the installation of Hallmark card studio deluxe 2007 and will receive error message "Error 1904.Module than c:\windows\syswow64\msxml4dll cannot be saved."
    I imagine the inconvenience that you are experiencing. We are here to help and guide you in the right direction.
    I may need a few more details to better understand the issue.
    1. deal with any issue when installing any other program?

    2. did you of recent changes on the computer before this problem?

    Method 1:
    I suggest you to run the fixit and check if it helps.

    Solve problems with programs that cannot be installed or uninstalled
    http://support.Microsoft.com/mats/program_install_and_uninstall

    Method 2:
    If the problem persists, I suggest to perform the clean boot and see if you can install the software.

    By setting your boot system minimum state helps determine if third-party applications or startup items are causing the problem.
    How to troubleshoot a problem by performing a clean boot in Windows Vista or Windows 7:
    http://support.Microsoft.com/kb/929135
    Note: After the boot minimum troubleshooting step, follow step 3 in the link provided to return the computer to a Normal startup mode.
    Method 3:
    If the problem persists, I suggest you try to remove all the temporary files in the temp folder. And check if it helps.
    Follow the steps to clear the temp folder:
    a. click the Start button and in the search in %temp% bar and press ENTER.
    b. the Temp folder opens, press on Ctrl + A , and then press delete.
    Note: I suggest that you backup important file or a folder in the Temp folder.
    You can check the links for more information:
    Get back to us and let us know the State of the question, I'll be happy to help you. We, at tender Microsoft to excellence.

  • Import text data into text with script level file fields


    I use Adobe 9 professional and have a level of javascript file import text into the existing fields of a pdf document.

    There are several fields with multiple lines of data to import.

    The folder level script does not work (but there is no error in the console showing when operating)

    I manually tested the file opening text with the following code in the console and the text file opens and fills text fields, so the text file must be correct:

    this.importTextData ();

    The following code is the folder level script that does not work:

    function mailmergeFunction()

    {


    Import the first line of data of "Mailmerge.txt".

    this.importTextData ("of/h/mailing/Jo Smith Things / Mailmerge.txt", 0)


    If (typeof cnt == 'undefined') cnt = 0;
    this.importTextData ("of/h/mailing/Jo Smith Things / Mailmerge.txt", cnt ++ % 4)

    }


    app.trustedFunction (mailmergeFunction);

    app.addToolButton ({cName: "Mailing", cExec: "mailmergeFunction ()", cTooltext: "Mailing", cEnable: true, NPO: 14});

    If anyone can please provide assistance, it will be more appreciated thanks.

    Try using an app.beginPriv () just before the importTextData statement and a statement of app.endPriv () afterwards. Don't forget to restart Acrobat after you change the JavaScript file.

  • CMD error: 'import' is not recognized as an internal or external command

    Hello
    I am Trying to the deployment of the OPS page R12 Instance in cmd running import the script I got below error

    'import' is not recognized as internal or external, command an executable program or batch file.

    could you tell me how to solve this problem.

    Thank you and best regards.
    Jocelyne.

    RAMU

    You can use URL below for your reference.

    http://oracleanil.blogspot.com/2009/04/import-export-commands.html

    Thank you
    AJ

  • Package Foglight - Custom Script Agent, a file?

    All,

    So, I am writing a custom script agent. It requires some bianary custom to be in the same folder. Is it possible to pack these bits in the agent?

    Thank you

    It is a pity that your screenshot does not show the corresponding part of the log file and the log file is not zipped and fastened. Otherwise, maybe your version, platform, and the FMS symptom matching the error described in SupportLink Solution 82250: https://support.quest.com/Search/SolutionDetail.aspx?id=SOL82250&category=Solutions&SKB=1&product=Foglight ?

    If so, an upgrade may be required to resolve the issue.

    Kind regards

    Brian Wheeldon

  • Document stored database import module

    Is it possible to import a module into a document, which is stored in the database, if I could write something like this:
    import module 'cool_functions' at 'dbxml:/container.dbxml/cool_functions.xquery'
    or
    import module namespace cool="urn:cool_namespace" at 'dbxml:/container.dbxml/cool_functions.xquery'
    Currently, base directory is added to the query and only I ' XmlQueryParserError error: cannot read the contents of the request of /some/path/dbxml:/container.dbxml/core_functions.xq [err: XQST0059], line 0, column 0'
    Specification does not deny this behavior, it [only said | http://www.w3.org/TR/xquery/#doc-xquery-ModuleImport] that it must be a URI after the keyword "at".

    Hello

    There are a number of things going on:
    1 XQuery (XQueryX vs) is not XML, so you can't store XQuery expressions or modules as a document XML of BDB. You can store it as metadata document or in a separate Berkeley DB database.
    2. There is no code built-in to import modules from anywhere in a container. You can create and save an instance of the XmlResolver object which is capable to do so given your own namespace

    Kind regards

    George

  • Windows Media Player Script ERREURUne error has occurred on this page of script line: 303 tank: 25 error: the value of the property 'btnfinish_onclick' is null or undefined, not a function of object Code: 0

    Where to find information on the album in Media Player, I get the following message appears when I click on the button "Finish":

    An error has occurred on this page of script
    Online: 303
    Tank: 25
    Error: the value of the property 'btnfinish_onclick' is null or undefined, not a function object
    Code: 0
    URL: HTTP://FAI.MUSIC.METASERVICES.MICROSOFT.COM/FAI/ALBUMMATCH.ASPX?LOCALE=409&GEOID=F4&VERSION=11.0.6002.18311&USERLOCALE=409
    Do you want to continue?
    By clicking 'Yes' or 'No' doesn't produce any action. Does 'Cancel' which is there for that.
    This feature works flawlessly for months and now I can't download the album or graphics information.
    Help, please. Thank you
    original title: Windows Media Player Script error

    I solved this on my machine after a few game.

    When you arrive at the last stage of the search for album information, before you click on finish, click the small globe in the upper left corner of the dialog box.  This refreshes the connection to the server.  Click on finish, then it started working again.

    Refresh a couple of times before that it worked but so far 2 of 2 machines working again on my other maching.

    Hope this helps!

    Thank you thank you. Sometimes, it takes "Refresh" several times but finally the player "seems" to calm down.

  • Error at startup APP name: error loading module 'name of the app' error check. on Blackberry 9800

    Hello.
    Now a day cannot open the newly added application that is downloaded from the app store.
    His pitches ' departure name APP Error: error loading module "app name" error check. "
    I searched online. but impossible to get the correct solution. I have given all the permissions and restart the unit more time. But not to use it.
    Some have said that it is the problem of the os. you need to reinstall the operating system.
    I don't know how to get the operating system and reinstall the operating system.
    Please help me.

    Hello.. Thank you. My problem is solved.

    I have clean the operating system and install the new os.

    Now, any problem is solved.

  • Error: the module is in use

    I use JavaLoader copy my app on my BB. But now for some reason I can't delete it. I always get the message "error: the module is in use" and even if I turned off my BB or even remove the battery. Any advice?

    Copy with cmd: JavaLoader-u zedi_efmwalkup.cod

    DELETE with cmd: JavaLoader-u zedi_efmwalkup

    Produce a JavaLoader u dir

    net_rim_bb_timezoneotapatcher             2.3              28268     Wed Feb 28 17:12:25 2007net_rim_bb_lbs_resource_en                1.1.35           33412     Fri May 04 10:08:43 2007zedi_efmwalkup                            1.0.332          143588    Wed Sep 24 18:11:59 2008GoogleMaps                                2.2.3            449508    Wed Jul 30 17:25:06 2008
    

    BlackBerry 8700 v4.2.1.101 (Platform 2.3.0.81)

    Forget about it. The Application loader in Desktop Manager manage to get rid of it.

    And here are the reasons why you may need to use the - f option.

    -The reason for which reset is required when you upgrade an application
    Article number: DB-00602

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800620/What_Is...

  • BlackBerry Smartphones Linkedin app gives error loading module

    Links in app gives error loading module in 9300 curve and after you have uninstalled it my curve 9300 has started to freeze at the navigation with a white screen... someone can tell me how to freeze screen resorve white!

    I just reload my os again and his normal work

  • Install streets & trips 2013 on windows 8 - "a licensing initialization error has occurred. Please contact customer support for further assistance. Error 0xC004D301 ".

    Original title: new installation of streets & trips 2013 on windows error 8.

    I have my windows 8 installation with the assurance that my products purchased from Microsoft survive the 8 Windows Reinstall "refreshed". Well all the Microsoft products were there but would not work. Each gave the error for rerinstall the product I did no problem except for the problem with the streets of travel & which still exists and is completely ignored by Microsoft, according to my research. The error is: "a licensing initialization error has occurred. Please contact customer support for further assistance. Error 0xC004D301 ". I tried all the suggestions that I have met on the internet. The most galling was given by Microsoft technology in its response to this problem. "The license data is probably corrupted" OK, makes sense, BUT how can I fix that you genius. Someone had managed to get the program to work after this error message?

    Success!  Hi John, I don't know if this will solve your problem because I am running windows 8.1 and tries to install streets & trips 2011.  But I had a similar symptom that you knew.  Here's what I did: just right-click on the icon in the start menu, select programs and features.  Uninstall all versions of Microsoft Visual C++ 2010, I had two.  Then I opened the installation dvd in Explorer, click right on dvdrun, marked the area run as long as administrator (not sure if it did anything or not), hit apply, then double clicked on dvdrun and everything worked.  I could install, validate, save, and run the program!
    A warning, I don't know what are the potential problems that may result in removing these two programs, I hope that if I run into something I can install them again without too much trouble.

Maybe you are looking for

  • Unknown channel or feature name repeated

    Hello I want to connect NI SMU-5451(waveform generator) and NI-SMU-7966R(Flex RIO) with peer-to-peer technology. I took an example of NOR-FGEN, which works perfectly, but when I use it in my project there is a mistake takes place - the "unknown chann

  • More HP psc 1200 series (all-in-one)

    MI more HP psc 1200 series all in a no prints porque el sistema reported that no tiene papel. He puesto cantidades of papel, pero continua respond that no papel tiene distintas. MI PC desktop are HP y tiene Windows 7 Ultimate. Gracias.

  • HOW CAN I GET MY COMPUTER TO SPEAK IN ENGLISH IN THE TEXT AGAIN!

    I don't know what I did. but when I turned on my computer that it expresses itself in an Asian language to research can u please help me to get it working properly again. As my time, office names and etc. is in an Asian language.

  • Replication of database ACS SE 3.3.3

    HelloW I have some problems with replication of database with 2 ACS SE 3.3.3 On each ACS, I have configured the other FAC as ACS server. On primary, I moved the ACS secondary to a replication partner. Secondary, I did not move primary ACS to a replic

  • Can you green screen in first video app?

    Can you green screen in first video app?