PicklingError: ADBConn.cmd_shell
Closed this issue · 3 comments
rohancme commented
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/python@3.8/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/python@3.8/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/python@3.8/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/python@3.8/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/python@3.8/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/python@3.8/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/python@3.8/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 commented
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 commented
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.