Hi all,

I have been writing an R script to run as a tool in galaxy and it
seems to work just fine.  I needed to add some fine-grained error
detection in the script and I wanted it to produce a "red X" if the
error occurred.  In order to do this I wrote to the stderr handle.
Before I had put in the error code, I had redirected stderr to
/dev/null in the xml, but I took that out so that galaxy could see the
errors I wrote to the stderr handle.  For some reason if I do not
redirect stderr to /dev/null, I get this error:

Traceback (most recent call last):
  File "/opt/Bio/galaxy-dist/lib/galaxy/jobs/runners/local.py", line
125, in run_job
    job_wrapper.finish( stdout, stderr )
  File "/opt/Bio/galaxy-dist/lib/galaxy/jobs/__init__.py", line 643, in finish
line 127, in do
    return getattr(self.registry(), name)(*args, **kwargs)
line 1356, in flush
line 1434, in _flush
line 261, in execute
    UOWExecutor().execute(self, tasks)
line 753, in execute
    self.execute_save_steps(trans, task)
line 768, in execute_save_steps
    self.save_objects(trans, task)
line 759, in save_objects
    task.mapper._save_obj(task.polymorphic_tosave_objects, trans)

line 1413, in _save_obj
    c = connection.execute(statement.values(value_params), params)
line 824, in execute
    return Connection.executors[c](self, object, multiparams, params)
line 874, in _execute_clauseelement
    return self.__execute_context(context)
line 896, in __execute_context
    self._cursor_execute(context.cursor, context.statement,
context.parameters[0], context=context)
line 950, in _cursor_execute
    self._handle_dbapi_exception(e, statement, parameters, cursor, context)
line 931, in _handle_dbapi_exception
    raise exc.DBAPIError.instance(statement, parameters, e,
ProgrammingError: (ProgrammingError) You must not use 8-bit
bytestrings unless you use a text_factory that can interpret 8-bit
bytestrings (like text_factory = str). It is highly recommended that
you instead just switch your application to Unicode strings. u'UPDATE
job SET update_time=?, stdout=?, stderr=? WHERE job.id = ?'
['2012-02-22 02:50:49.979136', 'locfit 1.5-6 \t 2010-01-20 \nnull
device \n          1 \nnull device \n          1 \nnull device \n
    1 \nnull device \n          1 \n\n Inf -Inf  NaN  \n 924  447 1710
   0 \nnull device \n          1 \nnull device \n          1 \nnull
device \n          1 \n', 'Loading required package:
Biobase\n\nWelcome to Bioconductor\n\n  Vignettes contain introductory
material. To view, type\n  \'browseVignettes()\'. To cite
Bioconductor, see\n  \'citation("Biobase")\' and for packages
\'citation("pkgname")\'.\n\nLoading required package: locfit\nLoading
required package: akima\nLoading required package: lattice\nWarning
messages:\n1: In xy.coords(x, y, xlabel, ylabel, log) :\n  1710 x
values <= 0 omitted from logarithmic plot\n2: In xy.coords(x, y,
xlabel, ylabel, log) :\n  2880 y values <= 0 omitted from logarithmic
plot\nWarning message:\nIn xy.coords(x, y, xlabel, ylabel, log) :\n
1710 x values <= 0 omitted from logarithmic plot\nLoading required
package: R.methodsS3\nR.methodsS3 v1.2.1 (2010-09-18) successfully
loaded. See ?R.methodsS3 for help.\nLoading required package:
R.oo\nR.oo v1.8.3 (2011-11-01) successfully loaded. See ?R.oo for
help.\n\nAttaching package: \xe2\x80\x98R.oo\xe2\x80\x99\n\nThe
following object(s) are masked from
throw.default\n\nThe following object(s) are masked from
\xe2\x80\x98package:methods\xe2\x80\x99:\n\n    getClass, getClasses,
getMethods\n\nThe following object(s) are masked from
\xe2\x80\x98package:base\xe2\x80\x99:\n\n    attach, detach,
environment, gc, load, save\n\naroma.light v1.22.0 (2011-10-31)
successfully loaded. See ?aroma.light for help.\n', 1345]

It seems that R produces some output on stdout that I can't get rid of
yet, but it doesn't seem to affect the outcome... it doesn't explain
why this error happens... Any ideas?  Is R using some sort of weird
encoding that the python can't get?

- Nik.

Nikhil Joshi
Bioinformatics Programmer
UC Davis Genome Center
Davis, CA
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:


Reply via email to