IDL Bridge [message #94009] |
Tue, 20 December 2016 06:58  |
s.fdrc70
Messages: 4 Registered: December 2016
|
Junior Member |
|
|
Dear all,
I'm trying to automatize the download of files from the internet and, in order to speed up the process, I use the IDL_IDLBRIDGE to download 2 files at the same time.
However, when I put the download in a crontab I get the following error (or when I execute the command from a remote machine) :
% Compiled module: SCARICO_12.
% Loaded DLM: IDL_IDLBRIDGE.
/usr/local/bin/wget ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20 16121912/gfs.t12z.pgrb2.0p25.f000
% Restored file: IDL_IDLBRIDGE::EXECUTETIMER.
% WIDGET_BASE: Unable to connect to X Windows display: :0.0
% SCARICO_12: IDL_IDLBridge: Unable to establish X Connection.
% Execution halted at: SCARICO_12 40 /Users/stefano/scarico/scarico_12.pro
How can I solve this problem?
Thanks
Stefano
|
|
|
Re: IDL Bridge [message #94010 is a reply to message #94009] |
Tue, 20 December 2016 07:28   |
Jim Pendleton
Messages: 165 Registered: November 2011
|
Senior Member |
|
|
On Tuesday, December 20, 2016 at 7:58:35 AM UTC-7, s.fd...@gmail.com wrote:
> Dear all,
>
> I'm trying to automatize the download of files from the internet and, in order to speed up the process, I use the IDL_IDLBRIDGE to download 2 files at the same time.
> However, when I put the download in a crontab I get the following error (or when I execute the command from a remote machine) :
>
> % Compiled module: SCARICO_12.
> % Loaded DLM: IDL_IDLBRIDGE.
> /usr/local/bin/wget ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20 16121912/gfs.t12z.pgrb2.0p25.f000
> % Restored file: IDL_IDLBRIDGE::EXECUTETIMER.
> % WIDGET_BASE: Unable to connect to X Windows display: :0.0
> % SCARICO_12: IDL_IDLBridge: Unable to establish X Connection.
> % Execution halted at: SCARICO_12 40 /Users/stefano/scarico/scarico_12.pro
>
>
> How can I solve this problem?
> Thanks
> Stefano
Hi Stefano,
In general, this error will be displayed if you attempt to use UI elements in a headless environment that lacks access to an X Windows server, such as in a cron job.
In this case, there's some code that's making a timer widget call, which isn't available in this environment.
In this case your code uses a method "IDL_IDLBridge::ExecuteTimer" that is not part of the base distribution of the class. There is a good chance that this is part of the issue. Someone must have written a .pro file that executes some timer widget logic, and packaged the logic up in a .pro file.
If possible, it would make sense to replace the logic associated with timer widget calls in your code with calls to the TIMER() class that was introduced in IDL 8.3, http://www.harrisgeospatial.com/docs/TIMER.html. It gets around the need for an underlying X Windows server.
Jim P.
|
|
|
Re: IDL Bridge [message #94011 is a reply to message #94009] |
Tue, 20 December 2016 07:35  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Tuesday, December 20, 2016 at 9:58:35 AM UTC-5, s.fd...@gmail.com wrote:
> Dear all,
>
> I'm trying to automatize the download of files from the internet and, in order to speed up the process, I use the IDL_IDLBRIDGE to download 2 files at the same time.
> However, when I put the download in a crontab I get the following error (or when I execute the command from a remote machine) :
>
> % Compiled module: SCARICO_12.
> % Loaded DLM: IDL_IDLBRIDGE.
> /usr/local/bin/wget ftp://ftpprd.ncep.noaa.gov/pub/data/nccf/com/gfs/prod/gfs.20 16121912/gfs.t12z.pgrb2.0p25.f000
> % Restored file: IDL_IDLBRIDGE::EXECUTETIMER.
> % WIDGET_BASE: Unable to connect to X Windows display: :0.0
> % SCARICO_12: IDL_IDLBridge: Unable to establish X Connection.
> % Execution halted at: SCARICO_12 40 /Users/stefano/scarico/scarico_12.pro
Your IDL is trying to connect to an X windows display that doesn't exist. The easiest way is to tell IDL that your display doesn't exist. Do this before you execute IDL: (pick whichever line matches your shell)
unsetenv DISPLAY # this is for csh or tcsh
unset DISPLAY # this is for bash or sh
And then to be sure, within IDL, tell IDL to use a different device...
set_plot, 'Z'
Here 'Z' means the Z-buffer, which doesn't try to connect to any screen.
Craig
|
|
|