Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail on using -cv mode #115

Open
josebeo2016 opened this issue Jun 2, 2020 · 3 comments
Open

Fail on using -cv mode #115

josebeo2016 opened this issue Jun 2, 2020 · 3 comments

Comments

@josebeo2016
Copy link

josebeo2016 commented Jun 2, 2020

I try to run droidbot to analyze an game apk (which written based on Unity). And I got this error:

WARNING:UtgGreedySearchPolicy:exception during sending events: 'NoneType' object has no attribute 'state_str'
Corrupt JPEG data: premature end of data segment
Traceback (most recent call last):
  File "/root/droidbot/droidbot/input_policy.py", line 69, in start
    input_manager.add_event(event)
  File "/root/droidbot/droidbot/input_manager.py", line 98, in add_event
    event_log.start()
  File "/root/droidbot/droidbot/input_event.py", line 231, in start
    self.event_str = self.event.get_event_str(self.from_state)
  File "/root/droidbot/droidbot/input_event.py", line 365, in get_event_str
    return "%s(state=%s, name=%s)" % (self.__class__.__name__, state.state_str, self.name)
AttributeError: 'NoneType' object has no attribute 'state_str'
WARNING:Device:exception in get_current_state: too many values to unpack (expected 2)
Traceback (most recent call last):
  File "/root/droidbot/droidbot/device.py", line 805, in get_current_state
    views = self.get_views()
  File "/root/droidbot/droidbot/device.py", line 870, in get_views
    views = self.minicap.get_views()
  File "/root/droidbot/droidbot/adapter/minicap.py", line 282, in get_views
    view_bounds = cv.find_views(img)
  File "/root/droidbot/droidbot/adapter/cv.py", line 74, in find_views
    contours, hierarchy = cv2.findContours(edges, cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE)
ValueError: too many values to unpack (expected 2)
@yuanchun-li
Copy link
Collaborator

Looks like the screenshot was broken. Does the error also occur on other devices or apps?

@josebeo2016
Copy link
Author

Looks like the screenshot was broken. Does the error also occur on other devices or apps?

It's not happening on all apps, but almost game apps. I try on 2 different phones but get same error. cv_mode currently doesn't support for the emulator, does it?

@kunalvasudevan
Copy link

we can update Read me file that help in it .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants