Xvfb error while trying to open multiple xvfb screens in single python session
See original GitHub issueGeneral information:
- OS name: Ubuntu
- OS version: 20.04
- OS architecture: 64 bits
- Resolutions:
- Monitor 1: 1920x1080
- Python version: 3.8.10
- MSS version: 6.1.0
For GNU/Linux users:
- Display server protocol and version, if known: Xorg
- Desktop Environment: Gnome
- Composite Window Manager name and version: Not sure
Description of the warning/error
The error comes when I try to call mss.mss() in a single python session with two different Xvfb screens.
Full message
XIO: fatal IO error 0 (Success) on X server ":3" after 8 requests (8 known processed) with 0 events remaining.
Other details
Steps to reproduce:
from xvfbwrapper import Xvfb
import mss
import os
xvfb = Xvfb(width=1920, height=1080, colordepth=24)
xvfb.start()
with mss.mss() as sct:
pass
xvfb.stop()
xvfb = Xvfb(width=1920, height=1080, colordepth=24)
xvfb.start()
with mss.mss() as sct:
pass
The error pops up exactly on this line
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Two instances of pyvirtualdisplay (xvfb) won't run at the same ...
So I have a small script which uses pyvirtualdisplay to make a virtual display to run some selenium tests. I have tested the...
Read more >38 How To Run Your Tests Headlessly with Xvfb
Option 1. Start Xvfb on a specific display port and background the process; Tell the terminal session to use the display port; Run...
Read more >Strange rendering issues when using xvfb-run
I want to run the app inside of a virtual frame buffer, using Xvfb, and access it remotely using a VNC. It may...
Read more >Install and configure Xserver Virtual Frame Buffer (Xvfb)
If Xvfb is present but not running, proceed to 1.3 Configure automatic start up. If it is not present, proceed to 1.3 Download...
Read more >xvfbman - PyPI
A python module for managing Xvfb sessions / ensuring DISPLAY through ... The xvfbman module provides an interface to start and manage Xvfb...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually those internal details were added for performance and memory leak reasons. Your situation is not so frequent, so I would go with the new function to clear the internal state.
Could you try to reset that attribute before the second use of MSS?