Comments (1)
I think the error is at this block of code:
def is_complete(self):
"""
Returns true if the video buffer is entirely opaque.
"""
if self.data is None:
return False
return self.data[:, :, self.mode.index('a')].all()
Where the whole screenshot is not being filled so .all()
returns false, then this loop:
async def screenshot(self, x: int = 0, y: int = 0, width: Optional[int] = None, height: Optional[int] = None):
"""
Takes a screenshot and returns a 3D RGBA array.
"""
self.video.data = None
self.video.refresh(x, y, width, height)
while True:
update_type = await self.read()
if update_type is UpdateType.VIDEO:
if self.video.is_complete():
return self.video.as_rgba()
the if self.video.is_complete()
is false, so the while True
loop loops again, which goes back to self.read()
, which then eventually goes all the way down to streams.py
to this bit of code:
async def _wait_for_data(self, func_name):
"""Wait until feed_data() or feed_eof() is called.
If stream was paused, automatically resume it.
"""
# StreamReader uses a future to link the protocol feed_data() method
# to a read coroutine. Running two read coroutines at the same time
# would have an unexpected behaviour. It would not possible to know
# which coroutine would get the next data.
if self._waiter is not None:
raise RuntimeError(
f'{func_name}() called while another coroutine is '
f'already waiting for incoming data')
assert not self._eof, '_wait_for_data after EOF'
# Waiting for data while paused will make deadlock, so prevent it.
# This is essential for readexactly(n) for case when n > self._limit.
if self._paused:
self._paused = False
self._transport.resume_reading()
self._waiter = self._loop.create_future()
try:
await self._waiter
finally:
self._waiter = None
Where the code waits forever at await self._waiter
Confusing bug, but I hope this helps.
from asyncvnc.
Related Issues (11)
- Sec type `2` unsupported? Auth with password fails.. HOT 9
- Unsupported video mode: `b' \x18\x00\xff\x00\xff\x00\xff\x00\xff\x10\x08\x00'` HOT 14
- Add `x11vnc` to actions instance HOT 1
- Could not connect to Tight-/UltraVNC. HOT 1
- PermissionError: Auth failed HOT 3
- Faster Screenshots? HOT 2
- RFC-6143 ClientCutText/ServerCutText doesn't work
- Incorrect logic behavior in the screenshot method.
- Connecting through SSH tunnels fails for Mac
- Shift Button does not register
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asyncvnc.