Sponsored Content
Top Forums UNIX for Dummies Questions & Answers xls2csv.py won't print to outfile Post 302680213 by jdilts on Wednesday 1st of August 2012 12:46:14 PM
Old 08-01-2012
xls2csv remotely on server doesn't work

Hi Corona688,

I moved the python tar to the server and installed it, but I'm getting an error. It seems that xls2cvs works locally, but I can't get it to work remotely.

Code:
ionadmin@ionT01:/results/analysis/output/Home/TuesdayJuly31_064/plugin_out/variantCaller_out/IonXpress_001$ python /home/ionadmin/tools/pyexcelerator-0.6.4.1/tools/xls2csv.py variants.xls > variants.csv
extracting data from variants.xls
Traceback (most recent call last):
  File "/home/ionadmin/tools/pyexcelerator-0.6.4.1/tools/xls2csv.py", line 17, in <module>
    for sheet_name, values in parse_xls(arg, 'cp1251'): # parse_xls(arg) -- default encoding
  File "/usr/local/lib/python2.6/dist-packages/pyExcelerator/ImportXLS.py", line 327, in parse_xls
    ole_streams = CompoundDoc.Reader(filename).STREAMS
  File "/usr/local/lib/python2.6/dist-packages/pyExcelerator/CompoundDoc.py", line 63, in __init__
    self.__build_header()
  File "/usr/local/lib/python2.6/dist-packages/pyExcelerator/CompoundDoc.py", line 105, in __build_header
    raise Exception, 'Not an OLE file.'
Exception: Not an OLE file.

My local computer is the latest Ubuntu LTS, but the server is Ubuntu 10.04.2 LTS. Do you think the server is missing dependencies that my local computer has?

EDIT! I am getting the same error both locally and remotely. I tested it on a fresh file in both places.

Last edited by jdilts; 08-01-2012 at 01:49 PM.. Reason: same error both local and remote
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Setting outfile with (brackets)

I have a file that comes in as 20081002_invoices.txt and needs to go out as invoices(20081002).xls When ran this file should have three seperate fields as follows: column1 column2 column3 data1 data2 data3 when i run the script it produces the invoices(20081002).xls but moves... (1 Reply)
Discussion started by: Pablo_beezo
1 Replies

2. AIX

won't mount /usr...won't boot fully

Hello: NOOB here. I attempted to use smit mkcd. Failed on first attempt, not enough space. 2nd attempt tried to place iso on /usr, not enough space there. Cleanup ran for about 5 minutes after aborting. Now AIX won't boot. LCD display on 7029-6E3 says: 0517 MOUNT /USR. Attempted to boot from CD... (11 Replies)
Discussion started by: bbird
11 Replies

3. UNIX for Dummies Questions & Answers

How to outfile contant as an input for a command

I`m having output file which contain following no which changes every time i run script.The number given below are there in file and i have to fatch them from file. 12 15 56 158 365 165 598 568 265 256 258 now i want to use above number from output to input as $j r=`/omp/bin/ICIC... (1 Reply)
Discussion started by: nitin_aaa27
1 Replies

4. Shell Programming and Scripting

print to more than one outfile AWK

I'd like to do an if / else if condition and print to different files. Something like: awk '{ if ($1 == "yes") print $2, $4 < infile > outfile1 ; else if ($1 == "No") print $2, $4 < infile > outfile2 }' Obviously I don't know the syntax. Thanks so much. (5 Replies)
Discussion started by: dcfargo
5 Replies

5. Slackware

Printer won't print but 1 page

OS: Slackwar 13.37 Printer: hpDeskjet 1000 j110 Printer Drivers/Software: HPLIP 3.11.3a (min was 3.10.9) and Cups The printer will print the first of n-pages but from page 2 on it prints the page (or part of it) backs up and starts again down about 0.8 lines and does this repeatedly till the... (2 Replies)
Discussion started by: slak0
2 Replies

6. UNIX for Dummies Questions & Answers

Outfile

Hi guys! So I have a program that allows the user to enter a file, change some characters (for example, a changes to t, etc.) and then save the new file under a new name. However, I need to press carriage return twice for the program to end. I was just wondering if anyone knew of a way for the... (2 Replies)
Discussion started by: PerlNutt
2 Replies

7. Shell Programming and Scripting

Variable won't print out - awk

done. (1 Reply)
Discussion started by: myaa02
1 Replies

8. Shell Programming and Scripting

Error while Converting Excel to CSV using xls2csv

I am using xls2csv to convert a xls file into a regular .csv file. However, while using the command as xls2csv fromfile.xls > tofile.csv I am getting the following error. fromfile.xls is not OLE file or Error I also tried to specify the comma as delimiter but did not help... xls2csv -c\,... (7 Replies)
Discussion started by: dhruuv369
7 Replies

9. UNIX for Beginners Questions & Answers

INTO OUTFILE Error 2

Good day, I am trying to run the following command but it does not seem to work. # mysql -pPassword asteriskcdrdb -s -b -e "select 'Account ID','Destination','Operator','Provider','Date','BillSec','Rate id','Cost' UNION select accountcode,dst,'PBX',route_name,date_format(calldate,'%Y/%c/%e... (8 Replies)
Discussion started by: esgaroth32
8 Replies

10. UNIX for Beginners Questions & Answers

Bash script won't run because hardware won't produce display

Can anyone offer any advice on how to modify the script below to work on a new system we have, that has no graphics capability? We admin the system through a serial RAS device. I've tried running the below script through the RAS and through an ssh -X session. It failed with something like "GTK... (3 Replies)
Discussion started by: yelirt5
3 Replies
DH_PYTHON(1)							     Debhelper							      DH_PYTHON(1)

NAME
dh_python - calculates Python dependencies and adds postinst and prerm Python scripts (deprecated) SYNOPSIS
dh_python [debhelperoptions] [-n] [-V version] [moduledirs...] DESCRIPTION
Note: This program is deprecated. You should use dh_python2 instead. This program will do nothing if debian/pycompat or a Python-Version control file field exists. dh_python is a debhelper program that is responsible for generating the ${python:Depends} substitutions and adding them to substvars files. It will also add a postinst and a prerm script if required. The program will look at Python scripts and modules in your package, and will use this information to generate a dependency on python, with the current major version, or on pythonX.Y if your scripts or modules need a specific python version. The dependency will be substituted into your package's control file wherever you place the token ${python:Depends}. If some modules need to be byte-compiled at install time, appropriate postinst and prerm scripts will be generated. If already byte- compiled modules are found, they are removed. If you use this program, your package should build-depend on python. OPTIONS
module dirs If your package installs Python modules in non-standard directories, you can make dh_python check those directories by passing their names on the command line. By default, it will check /usr/lib/site-python, /usr/lib/$PACKAGE, /usr/share/$PACKAGE, /usr/lib/games/$PACKAGE, /usr/share/games/$PACKAGE and /usr/lib/python?.?/site-packages. Note: only /usr/lib/site-python, /usr/lib/python?.?/site-packages and the extra names on the command line are searched for binary (.so) modules. -V version If the .py files your package ships are meant to be used by a specific pythonX.Y version, you can use this option to specify the desired version, such as 2.3. Do not use if you ship modules in /usr/lib/site-python. -n, --noscripts Do not modify postinst/prerm scripts. CONFORMS TO
Debian policy, version 3.5.7 Python policy, version 0.3.7 SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Josselin Mouette <joss@debian.org> most ideas stolen from Brendan O'Dea <bod@debian.org> 9.20120909 2011-12-06 DH_PYTHON(1)
All times are GMT -4. The time now is 04:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy