gaffer Dispatch seems to want a screen...

114 views
Skip to first unread message

rupert thorpe

unread,
Oct 29, 2021, 7:36:27 AM10/29/21
to gaffer-dev
Hello,

I have a script that finds published assets without turntables and kicks off a job to render a turntable for said asset.

this is working fine, but I tried to run it on a server rather than my workstation and I get the following error:

~~~~~~~~~~~

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/mnt/apps/rez/packages/gaffer/0.60.7/platform-linux/gaffer/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.

/tmp/rez_context_EUm607/rez-shell.sh: line 8: 28131 Aborted                 (core dumped) gaffer dispatch -gui False -script //job/MGTO3/EPISODE/pipe/.............

~~~~~~~~~~~~

Does gaffer dispatch need a screen to connect to?  
I ssh'ed into my own workstation and got the same issue, so it doesn't seem like its a machine configuration thing.

John Haddon

unread,
Oct 29, 2021, 8:53:00 AM10/29/21
to gaffe...@googlegroups.com
Hi Rupert,

The `GafferUI` module does require an X display, but the GafferUI module shouldn't be loaded during dispatch. The `dispatch` app does have a GUI mode, but it makes sure not to import `GafferUI` when not in GUI mode, and the related config files do the same thing - see links below for details :


It's possible that we've got a regression, but I just checked here and didn't see a problem. Perhaps something in your own codebase is doing an `import GafferUI`?

Cheers...
John


--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gaffer-dev/c04853d0-8d85-4610-bd7c-76475367e271n%40googlegroups.com.

Andrew Kaufman

unread,
Oct 29, 2021, 8:55:21 AM10/29/21
to gaffe...@googlegroups.com
You would get that error if you’re importing any GafferUI module, but should not get it just from loading the “core” modules. So it will depend on your specific code and which modules are being imported.

It is pretty easy to accidentally have a UI import inside an extension module or startup config, I would guess that is the first place to look.

If you can’t untangle it, you can try using xvfb-run to run your command. We do this for the UI tests on GitHub, for example.

Cheers,
Andrew
--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+unsubscribe@googlegroups.com.


--
IED Logo
Andrew Kaufman | Software Engineering Supervisor
Image Engine | 15 West 5th Ave, Vancouver, BC, V5Y 1H4
t: +1 604 874 5634
image-engine.com [a Cinesite Partner Company]

Cinesite 30 Years

rupert thorpe

unread,
Oct 29, 2021, 9:36:42 AM10/29/21
to gaffer-dev
thanks for the info.

I believe this may be from gafferDeadline, which I am using (and very happy with)

will try to track it down.
On Friday, 29 October 2021 at 13:55:21 UTC+1 andrewk wrote:
You would get that error if you’re importing any GafferUI module, but should not get it just from loading the “core” modules. So it will depend on your specific code and which modules are being imported.

It is pretty easy to accidentally have a UI import inside an extension module or startup config, I would guess that is the first place to look.

If you can’t untangle it, you can try using xvfb-run to run your command. We do this for the UI tests on GitHub, for example.

Cheers,
Andrew

On Friday, 29 October 2021, rupert thorpe <pure...@gmail.com> wrote:
Hello,

I have a script that finds published assets without turntables and kicks off a job to render a turntable for said asset.

this is working fine, but I tried to run it on a server rather than my workstation and I get the following error:

~~~~~~~~~~~

qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/mnt/apps/rez/packages/gaffer/0.60.7/platform-linux/gaffer/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.

/tmp/rez_context_EUm607/rez-shell.sh: line 8: 28131 Aborted                 (core dumped) gaffer dispatch -gui False -script //job/MGTO3/EPISODE/pipe/.............

~~~~~~~~~~~~

Does gaffer dispatch need a screen to connect to?  
I ssh'ed into my own workstation and got the same issue, so it doesn't seem like its a machine configuration thing.

--
You received this message because you are subscribed to the Google Groups "gaffer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaffer-dev+...@googlegroups.com.

John Haddon

unread,
Oct 29, 2021, 9:52:53 AM10/29/21
to gaffe...@googlegroups.com
At a glance, I don't see anything amiss in GafferDeadline. Could you make a `~/gaffer/startup/GafferUI/test.py` file and put this in it please?

```
import traceback
traceback.print_stack()
```

Then when you run your `gaffer dispatch` command, you should get a bunch of output that will tell us what is responsible for importing GafferUI...
Cheers...
John


rupert thorpe

unread,
Oct 29, 2021, 10:03:24 AM10/29/21
to gaffer-dev
[rupertt@ws-304 ~]$ rez-env gafferDefault -- gaffer dispatch
/mnt/apps/rez/packages/mysql_connector_python/8.0.23/8155fb0fa65780eccf957cd1a2e822d952f29437/python/mysql/connector/__init__.py:72: DeprecationWarning: MySQL Connector/Python will drop support for Python 2.7 in release 8.0.24. Please upgrade your Python as Python 2.7 won't work after this release
  "won't work after this release", category=DeprecationWarning)
  File "/rez/cache/gaffer/0.60.7/1874/a/gaffer/bin/__gaffer.py", line 168, in <module>
    result = app.run()
  File "/rez/cache/gaffer/0.60.7/1874/a/gaffer/python/Gaffer/Application.py", line 110, in run
    return self.__run()
  File "/rez/cache/gaffer/0.60.7/1874/a/gaffer/python/Gaffer/Application.py", line 141, in __run
    self._executeStartupFiles( self.root().getName() )
  File "/rez/cache/gaffer/0.60.7/1874/a/gaffer/python/Gaffer/Application.py", line 130, in _executeStartupFiles
    IECore.loadConfig( "GAFFER_STARTUP_PATHS", contextDict, subdirectory = applicationName )
  File "/rez/cache/gaffer/0.60.7/1874/a/gaffer/python/IECore/ConfigLoader.py", line 79, in loadConfig
    fileContextDict, fileContextDict
  File "/mnt/apps/rez/packages/six/1.16.0/ff5a17a870e473adea6d65972631222d54a381e6/python/six.py", line 735, in exec_
    exec("""exec _code_ in _globs_, _locs_""")
  File "<string>", line 1, in <module>
  File "/mnt/apps/rez/packages/gaffer_deadline/0.55.2.0/platform-linux/gaffer_deadline/startup/dispatch/menus.py", line 1, in <module>
    import GafferDeadlineUI
  File "/mnt/apps/rez/packages/gaffer_deadline/0.55.2.0/platform-linux/gaffer_deadline/python/GafferDeadlineUI/__init__.py", line 38, in <module>
    from .ListWidget import ListWidget
  File "/mnt/apps/rez/packages/gaffer_deadline/0.55.2.0/platform-linux/gaffer_deadline/python/GafferDeadlineUI/ListWidget.py", line 43, in <module>
    import GafferUI
  File "/rez/cache/gaffer/0.60.7/1874/a/gaffer/python/GafferUI/__init__.py", line 305, in <module>
    __import__( "IECore" ).loadConfig( "GAFFER_STARTUP_PATHS", subdirectory = "GafferUI" )
  File "/rez/cache/gaffer/0.60.7/1874/a/gaffer/python/IECore/ConfigLoader.py", line 79, in loadConfig
    fileContextDict, fileContextDict
  File "/mnt/apps/rez/packages/six/1.16.0/ff5a17a870e473adea6d65972631222d54a381e6/python/six.py", line 735, in exec_
    exec("""exec _code_ in _globs_, _locs_""")
  File "<string>", line 1, in <module>
  File "/rez/cache/gaffer/0.60.7/1874/a/gaffer/startup/GafferUI/test.py", line 2, in <module>
    traceback.print_stack()
ERROR : gaffer dispatch : No task nodes were specified

John Haddon

unread,
Oct 29, 2021, 10:20:42 AM10/29/21
to gaffe...@googlegroups.com
Looks like it was GafferDeadline after all - I've updated you ticket to include the relevant details...
Cheers...
John

eric...@gmail.com

unread,
Oct 29, 2021, 11:31:06 AM10/29/21
to gaffer-dev
Thanks for both reporting and helping sort out the import bug everyone. I responded to the issue on Github with a fix - in case anyone is coming across this from GafferDeadline, I'll have a new release up shortly.

Usually at this time of year problems with headless things are usually coming from up the river in Sleepy Hollow, but go figure.

- Eric

Reply all
Reply to author
Forward
0 new messages