Python script and modules.

 
Thread Tools Search this Thread
Homework and Emergencies Emergency UNIX and Linux Support Python script and modules.
# 1  
Old 03-18-2011
Python script and modules.

I am running a python script as follows from a shell script and getting an error as the following. Can anybody help to sort it out.

Code:
++ ORACLE_HOME=/opt/oracle
++ JAVA_HOME=/usr/local/jdk1.5
++ LD_LIBRARY_PATH=/usr/lib:/lib:/usr/ucblib:/opt/oracle/lib32:/usr/local/lib:/vobs/gtx1/libsolaris
++ export PATH ORACLE_HOME JAVA_HOME LD_LIBRARY_PATH UDE_HOME UDE_CSV_FOLDER
+ cd /opt/app/tools/UDE/UserDataExtract-11.01.18/deploy/scripts
+ python UdeManager.py
Traceback (most recent call last):
  File "UdeManager.py", line 16, in <module>
    import UdeProcessReqFile
  File "/opt/app/tools/UDE/UserDataExtract-11.01.18/deploy/scripts/UdeProcessReqFile.py", line 18, in <module>
    import UdeExtractService
  File "/opt/app/tools/UDE/UserDataExtract-11.01.18/deploy/scripts/UdeExtractService.py", line 13, in <module>
    import UdeDatabaseService
  File "/opt/app/tools/UDE/UserDataExtract-11.01.18/deploy/scripts/UdeDatabaseService.py", line 5, in <module>
    import cx_Oracle
ImportError: /usr/local/lib/python2.5/site-packages/cx_Oracle.so: wrong ELF class: ELFCLASS32
+ exit 0

# 2  
Old 03-18-2011
Several possibilities. First, the Oracle library is compiled fir a different architecture than the host you are running on. Do an "arch" and compare it's output to "file librarypath". You might be on a Sparc but Oracle is compiled for i386. Even i686 and x86_64 can clash.

Second, it's not the hardware chipset causing the incompatibility, but the OS (Solaris vs Linux or Linux vs BSD).

Third, the Oracle binary has been corrupted.

The solution for all these is the same: (re)install tge Oracle-python support
Libraries for your hardware and OS.
# 3  
Old 03-18-2011
from the error message, I guess you have a 64-bit Os, and
cx_Oracle.so
was somehow compiled with 32-bit.
ELF indicates the Executable and Linkable Format. ELFCLASS32 means that it's a 32-bit ELF file.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

How to execute python script on remote with python way..?

Hi all, I am trying to run below python code for connecting remote windows machine from unix to run an python file exist on that remote windows machine.. Below is the code I am trying: #!/usr/bin/env python import wmi c = wmi.WMI("xxxxx", user="xxxx", password="xxxxxxx")... (1 Reply)
Discussion started by: onenessboy
1 Replies

2. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies

3. Shell Programming and Scripting

Script to install Perl Modules

Hi guys, I need to upgrade perl modules on about multiple machines. I'm writing a for loop for it. for i in 1 2 3 4 5 6; do ssh server$i " sudo cpan Mozilla::CA, sudo cpan LWP::UserAgent, sudo cpan LWP::Protocol::https, sudo cpan IO::Socket::SSL, sudo cpan Net::SSL,... (2 Replies)
Discussion started by: scj2012
2 Replies

4. Shell Programming and Scripting

Python script called by a shell script

experts, i wrote a python script to do a certain job, i tried it and it is working fine, i want this script to be executed automatically after a ksh script, the problem is when i execute the ksh script my python script runes perfectly after the ksh script as I have include it at the end of the ksh... (1 Reply)
Discussion started by: q8devilish
1 Replies

5. Programming

How to automatically install all modules required by a script from CPAN?

Having a script.pl how can I automatically download from CPAN all required modules and install and update as required? Something like "emerge -uDNav world" for the perl? ---------- Post updated at 05:38 PM ---------- Previous update was at 05:28 PM ---------- Doesn't matter I've found it ... (6 Replies)
Discussion started by: Tribe
6 Replies

6. Shell Programming and Scripting

how to create custom modules in perl and how to import all modules with single command?

I have some custom functions which i want to use in perl Scripting all time. i want to How to create modules in perl and how to import them. Also if i create 15 modules and i want to > import all at once then how can i import? (0 Replies)
Discussion started by: Navrattan Bansa
0 Replies

7. Shell Programming and Scripting

Passing variable from shell script to python script

I have a shell script main.sh which inturn call the python script ofdm.py, I want to pass two variables from shell script to python script for its execution. How do i achieve this ????? Eg: main.sh a=3 b=3; c= a+b exec python ofdm.py ofdm.py d=c+a Thanks in Anticipation (4 Replies)
Discussion started by: shashi792
4 Replies

8. Shell Programming and Scripting

Hi Python and shell script,the script hangs

Hi I need to run a shell script from a TCL script,the shell script in trun will run a python script 1.Tcl script set filename "./GopiRun.sh" 2.GopiRun.sh python ./psi.py $MYSB/test_scripts/delivery/gpy1.py 3.I have my gpy1.py script. Here the problem i am facing is on running... (0 Replies)
Discussion started by: nathgopi214
0 Replies

9. Shell Programming and Scripting

How to run python script from a Tcl script

Hi I have a python script,i need to run this script from a tcl script.Can anyone let me know how to do this (1 Reply)
Discussion started by: nathgopi214
1 Replies
Login or Register to Ask a Question