← Back to team overview

yade-dev team mailing list archive

Re: [Bug 1241817] [NEW] yade batch mode fails

 

Hi Nolan

GUI is not working in batch mode. If you want to use the same script in batch 
and normal mode you can use something like this:

if not runningInBatch():
	from yade import qt

Use the variable runningInBatch() in order to automatically determine if the 
script is running in batch mode or not.

HTH
Klaus

On Friday 18 October 2013 20:24:28 Nolan Dyck wrote:
> Public bug reported:
> 
> when I try to run yade in batch mode it always fails, giving the error
> in a log file:
> 
> Welcome to Yade 2013-10-16.git-fe8b27e
> TCP python prompt on localhost:9000, auth cookie `kasdys'
> Warning: no X rendering available (see
> https://bbs.archlinux.org/viewtopic.php?id=13189) XMLRPC info provider on
> http://localhost:21000
> Running script ../periodic-sphere.py
> Traceback (most recent call last):
>   File "/usr/local/bin/yade-2013-10-16.git-fe8b27e", line 174, in runScript
>     execfile(script,globals())
>   File "../periodic-sphere.py", line 1, in <module>
>     from yade import pack,export,utils,plot,qt
>   File
> "/usr/local/lib/i386-linux-gnu/yade-2013-10-16.git-fe8b27e/py/yade/qt/__ini
> t__.py", line 3, in <module> if not yade.runtime.hasDisplay: raise
> ImportError("Connecting to DISPLAY at Yade startup failed, unable to
> activate the qt4 interface.") ImportError: Connecting to DISPLAY at Yade
> startup failed, unable to activate the qt4 interface.
> 
> =================== JOB SUMMARY ================
> id      : Row=0,numSpheres=100,REVL=0.636621,Save=1
> status  : 256 (FAILED)
> duration: 00:00:00
> command : YADE_BATCH=initparam.table:2 DISPLAY= 
> /usr/local/bin/yade-2013-10-16.git-fe8b27e --threads=1 --nice=10 -x
> ../periodic-sphere.py>
> ../periodic-sphere.py.Row=0,numSpheres=100,REVL=0.636621,Save=1.log 2>&1
> started : Fri Oct 18 16:11:49 2013
> finished: Fri Oct 18 16:11:49 2013
> 
> ----------------------------------------------------------------------------
> -------
> 
> I am inline with the github revision
> 5aa3f6f4856958a2062a0b8f0558857e86ee8a50 (Oct 16). The suggested
> ArchLinux link is dead.
> 
> ** Affects: yade
>      Importance: Undecided
>          Status: New
> 
> --
> You received this bug notification because you are a member of Yade
> developers, which is subscribed to Yade.
> https://bugs.launchpad.net/bugs/1241817
> 
> Title:
>   yade batch mode fails
> 
> Status in Yet Another Dynamic Engine:
>   New
> 
> Bug description:
>   when I try to run yade in batch mode it always fails, giving the error
>   in a log file:
> 
>   Welcome to Yade 2013-10-16.git-fe8b27e
>   TCP python prompt on localhost:9000, auth cookie `kasdys'
>   Warning: no X rendering available (see
> https://bbs.archlinux.org/viewtopic.php?id=13189) XMLRPC info provider on
> http://localhost:21000
>   Running script ../periodic-sphere.py
>   Traceback (most recent call last):
>     File "/usr/local/bin/yade-2013-10-16.git-fe8b27e", line 174, in
> runScript execfile(script,globals())
>     File "../periodic-sphere.py", line 1, in <module>
>       from yade import pack,export,utils,plot,qt
>     File
> "/usr/local/lib/i386-linux-gnu/yade-2013-10-16.git-fe8b27e/py/yade/qt/__ini
> t__.py", line 3, in <module> if not yade.runtime.hasDisplay: raise
> ImportError("Connecting to DISPLAY at Yade startup failed, unable to
> activate the qt4 interface.") ImportError: Connecting to DISPLAY at Yade
> startup failed, unable to activate the qt4 interface.
> 
>   =================== JOB SUMMARY ================
>   id      : Row=0,numSpheres=100,REVL=0.636621,Save=1
>   status  : 256 (FAILED)
>   duration: 00:00:00
>   command : YADE_BATCH=initparam.table:2 DISPLAY= 
> /usr/local/bin/yade-2013-10-16.git-fe8b27e --threads=1 --nice=10 -x
> ../periodic-sphere.py>
> ../periodic-sphere.py.Row=0,numSpheres=100,REVL=0.636621,Save=1.log 2>&1
> started : Fri Oct 18 16:11:49 2013
>   finished: Fri Oct 18 16:11:49 2013
> 
>  
> ---------------------------------------------------------------------------
> --------
> 
>   I am inline with the github revision
>   5aa3f6f4856958a2062a0b8f0558857e86ee8a50 (Oct 16). The suggested
>   ArchLinux link is dead.
> 
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/yade/+bug/1241817/+subscriptions
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev
> More help   : https://help.launchpad.net/ListHelp

-- 
Dr. Klaus Thoeni - Centre for Geotechnical and Materials Modelling
Civil, Surveying and Environmental Engineering - Engineering Building EA
The University of Newcastle, Callaghan, NSW 2308, Australia
web: http://www.newcastle.edu.au/research-centre/cgmm
phone: +61 (0)2 4921 5735

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1241817

Title:
  yade batch mode fails

Status in Yet Another Dynamic Engine:
  New

Bug description:
  when I try to run yade in batch mode it always fails, giving the error
  in a log file:

  Welcome to Yade 2013-10-16.git-fe8b27e 
  TCP python prompt on localhost:9000, auth cookie `kasdys'
  Warning: no X rendering available (see https://bbs.archlinux.org/viewtopic.php?id=13189)
  XMLRPC info provider on http://localhost:21000
  Running script ../periodic-sphere.py
  Traceback (most recent call last):
    File "/usr/local/bin/yade-2013-10-16.git-fe8b27e", line 174, in runScript
      execfile(script,globals())
    File "../periodic-sphere.py", line 1, in <module>
      from yade import pack,export,utils,plot,qt
    File "/usr/local/lib/i386-linux-gnu/yade-2013-10-16.git-fe8b27e/py/yade/qt/__init__.py", line 3, in <module>
      if not yade.runtime.hasDisplay: raise ImportError("Connecting to DISPLAY at Yade startup failed, unable to activate the qt4 interface.")
  ImportError: Connecting to DISPLAY at Yade startup failed, unable to activate the qt4 interface.

  =================== JOB SUMMARY ================
  id      : Row=0,numSpheres=100,REVL=0.636621,Save=1
  status  : 256 (FAILED)
  duration: 00:00:00
  command : YADE_BATCH=initparam.table:2 DISPLAY=  /usr/local/bin/yade-2013-10-16.git-fe8b27e --threads=1 --nice=10 -x ../periodic-sphere.py> ../periodic-sphere.py.Row=0,numSpheres=100,REVL=0.636621,Save=1.log 2>&1
  started : Fri Oct 18 16:11:49 2013
  finished: Fri Oct 18 16:11:49 2013

  -----------------------------------------------------------------------------------

  I am inline with the github revision
  5aa3f6f4856958a2062a0b8f0558857e86ee8a50 (Oct 16). The suggested
  ArchLinux link is dead.

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1241817/+subscriptions


References