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

PicklingError: ADBConn.cmd_shell #33

Closed
rohancme opened this issue Oct 27, 2020 · 3 comments
Closed

PicklingError: ADBConn.cmd_shell #33

rohancme opened this issue Oct 27, 2020 · 3 comments

Comments

@rohancme
Copy link

Hello,

I tried running this after a successful install in my virtualenv.

This is the stack trace:

python -m andriller
INFO:andriller.windows:Started: Andriller CE 3.5.1
ERROR:andriller:Failed to execute a gui window.
Traceback (most recent call last):
  File "/Users/user/Downloads/temp/env/lib/python3.8/site-packages/andriller/__init__.py", line 42, in run
    root = windows.MainWindow(log_level=level)
  File "/Users/user/Downloads/temp/env/lib/python3.8/site-packages/andriller/windows.py", line 306, in __init__
    self.adb = adb_conn.ADBConn(logger=logger, log_level=self.log_level)
  File "/Users/user/Downloads/temp/env/lib/python3.8/site-packages/andriller/adb_conn.py", line 41, in __init__
    self.setup(log_level)
  File "/Users/user/Downloads/temp/env/lib/python3.8/site-packages/andriller/adb_conn.py", line 49, in setup
    self.adb_bin = self.cmd_shell('which adb') or None
  File "/Users/user/Downloads/temp/env/lib/python3.8/site-packages/timeout_decorator/timeout_decorator.py", line 91, in new_function
    return timeout_wrapper(*args, **kwargs)
  File "/Users/user/Downloads/temp/env/lib/python3.8/site-packages/timeout_decorator/timeout_decorator.py", line 146, in __call__
    self.__process.start()
  File "/usr/local/Cellar/[email protected]/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/usr/local/Cellar/[email protected]/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/local/Cellar/[email protected]/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 283, in _Popen
    return Popen(process_obj)
  File "/usr/local/Cellar/[email protected]/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/Cellar/[email protected]/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/Cellar/[email protected]/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/usr/local/Cellar/[email protected]/3.8.3_2/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <function ADBConn.cmd_shell at 0x103fee940>: it's not the same object as andriller.adb_conn.ADBConn.cmd_shell

I've got android-platform-tools installed (brew cask install android-platform-tools). Running this on OSX with python 3.8.3.

Any idea how I can get this running?

@den4uk
Copy link
Owner

den4uk commented Oct 28, 2020

Hi, the error related to a time out decorator, as here: pnpnpn/timeout-decorator#43

This seems to affect Python version 3.8, but has not been seen in Python 3.7.

@den4uk
Copy link
Owner

den4uk commented Oct 28, 2020

Could you try switching to the dev branch, a fix was pushed to address the issue.
https://github.com/den4uk/andriller/tree/dev

Many thanks.

@den4uk
Copy link
Owner

den4uk commented Nov 7, 2020

#34 merged that fixes the issue.

@den4uk den4uk closed this as completed Nov 7, 2020
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

2 participants