question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Windows' object has no attribute 'display_info'

See original GitHub issue

Bug description Hi I’m trying to get the Windows resolution with the getPortSize() function in airtestScreen, but I get this error when running the getPortSize() function when connected to a windows build unity window

Stacktrace -> line 13, in getPortSize disp = current_device().display_info AttributeError: ‘Windows’ object has no attribute ‘display_info’

To Reproduce Steps to reproduce the behavior:

  1. Copy the below code

“”" from poco.utils.airtest.screen import AirtestScreen airtestScreen = AirtestScreen() screenPixels = airtestScreen.getPortSize() “”"

  1. Open a new airtest project
  2. Connect to a unity window
  3. Run code

Expected behavior "Get windows window resolution from getPortSize() function

python version: Python 3.7

airtest version: `1.2.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
yimeliacommented, May 5, 2019

try this:

from airtest.core.api import *
disp = device().get_current_resolution()
0reactions
phantomsomcommented, Jul 19, 2019

Hi, Is the Windows 10, Unity game build window unsynchronized problem fixed by any chance? image Right now I have to include this code to provide the correct focus_rect() for poco.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get the screen size of any computer - Stack Overflow
display.get_surface().get_size() AttributeError: 'NoneType' object has no attribute 'get_size') I've seen it's possible here and well as other ...
Read more >
'Window' object has no attribute '_progSignedTexFont' - Builder
I keep getting the error AttributeError: 'Window' object has no attribute '_progSignedTexFont' ################ Experiment ended with exit ...
Read more >
pygame.display — pygame v2.1.4 documentation
This module offers control over the pygame display. Pygame has a single display Surface that is either contained in a window or runs...
Read more >
AttributeError: 'function' object has no attribute - Microsoft Learn
Using protected keywords from the DataFrame API as column names results in a function object has no attribute error message.
Read more >
display - CSS: Cascading Style Sheets - MDN Web Docs
Turns off the display of an element so that it has no effect on layout (the document is rendered as though the element...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found