Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Re: Handling REvalError on remote connection?

98 views
Skip to first unread message

Ralph Heinkel

unread,
May 7, 2013, 5:09:02 AM5/7/13
to pyrs...@googlegroups.com
Hi Clayton,

pyRserve makes no real difference btw. Rserve running locally or on a remote machine, the way it connects to Rserve is identical in both scenarios.
Can you give more details about what you are trying to do? And also details about Python and Rserve versions, OS(es), ...?

Ralph

Am Montag, 6. Mai 2013 21:16:19 UTC+2 schrieb Clayton Tino:
Hi,

I'm using pyRserve to connect to an Rserve instance on a remote machine, but am having issues catching the REvalError exception.  Running Rserve on my local machine, there are no issues handling the exception.  However, it seems that no exception is triggered in the event of a remote Rserve instance and the connection just sits open with no response.

Any help would be appreciated.

Ralph Heinkel

unread,
May 11, 2013, 5:52:24 AM5/11/13
to pyrs...@googlegroups.com
hmm, this is indeed strange. From the pyRserve point of view such an exception can only be raised if the exception is delivered from the remote side.

The question is whether Rserve on the remote side shows the exception, but doesn't deliver it, or whether pyRserve receives the exception, but doesn't raise it.

Is this problem reproducible? If so, would you be able to condense your R code into very few lines of code so that I can play with it?
(Please post your answer to this mailing list, not to my private email address)

Ralph
Sure.  I'm running:

Rserve Machine (VM):

OS:  SLES 11-SP2
R:  2.15-3
Rserve:  1.7-0

Client Machine:
OS: Debian Wheezy
pyRserve:  0.7.0

I'm using Celery to automate some batch data processing.  I have a Celery worker on the client machine that conditions some data, creates a connection to an Rserve host, runs some R routines on said data, and retrieves the result.  Occasionally, the R routines will throw an error.  If I host the Rserve instance on the same client machine as the worker, pyRserve raises the REvalError exception as expected.  However, if worker creates a a connection to an Rserve instance on a remote host, the exception isn't raised.  I ran Rserve in debug mode and the REval error is thrown in the Rserve instance, but no exception is returned to the Celery worker.

As a workaround, I simply added a few tryCatch() statements to my R code to return an NULL value in the event of an error.  I thought I'd ask about this behavior, however.


Clayton Tino

unread,
Oct 1, 2013, 1:34:24 PM10/1/13
to pyrs...@googlegroups.com
I realize this is a very old post at this point, but I've since figured out the issue (as it relates to pyRserve at least).  Rserve shows the exception, and pyRserve receives the exception.  However, the exception is quashed by Celery when using a remote instance for some unbeknownst reason.  I noticed the same issue with while using a pika application to access an Rserve instance via AMQP.  In any event, there is no issue with Rserve/pyRserve as far as I can tell.

Ralph Heinkel

unread,
Oct 1, 2013, 2:22:39 PM10/1/13
to pyrs...@googlegroups.com
Hi Clayton,
OK, thanks for letting me know about what you've found out.

Ralph
Reply all
Reply to author
Forward
0 new messages