Front end developers must read! Starting from scratch, teach you to build a low code website platform in stages>>>
After colleagues of the company have learned about the newly installed automation environment, an error occurred while running the multi process test case:
multiprocessing.pool.MaybeEncodingError: Error sending result: ’< appium.webdriver.webdriver.WebDriver (session=“261019ae-3776-4a78-aa2c-b24bb64ec62e”)>’. Reason: ’AttributeError(“Can’t pickle local object ‘PoolManager.__ init__.& lt; locals>.& lt; lambda>‘“)’
I don’t have the same code here
There are three ways to search on the Internet
1. Replace process with thread
2. Copy can be used_ Reg to avoid the above exception.
3. Dill or paths. Multiprocessing: use ‘import paths. Multiprocessing’, instead of ‘import multiprocessing’. Paths. Multiprocessing is a fork of multiprocessing that uses dill. Dill can serialize almost anything in Python, so you are able to send a lot more around in parallel. 3
At the beginning, method 3 is used: use ‘import paths. Multiprocessing’, instead of ‘import multiprocessing’, and then the program does not throw the error, but after starting the case, appium does not work after starting the driver (using two processes to start the driver on different ports), and appium log has no error, Pychar has also been stuck there and does not execute find element, so it is still restored to using Import multiprocessing
The final solution is as follows:
1. Delete all the python in MAC
2. Install python with pyenv 3.5.2
3. Execute multi process case script
4. Install selenium, pilot and requests of the installation
5. The last step is to demote appium Python client: PIP install appium Python client = = 0.25 (this is the important point, you can directly demote the version by ignoring other steps, here is to re install it because you need to, Of course, the 0.31 version of local is OK, that is, there is a problem with the latest version (0.43)
6. Success
Similar Posts:
- [Solved] Appium Error: selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Can’t stop process; it’s not currently runni…
- Under Ubuntu system, selenium opens the Firefox browser and prompts’ unable to find a matching set of capabilities. And message: connect
- Mac environment and python + selenium environment are built to solve the error reporting problem of chromedriver
- Error reporting in Firefox using selenium in Python
- [Solved] Appium Error: Message: Message: Parameters were incorrect. We wanted {“required”:[“value”]}
- Paddlepaddle uses multi process error reporting “(External) CUDA error (3), initialization error.” solution.
- [Solved] Chrome Version Error: Message: session not created: This version of ChromeDriver only supports Chrome version 95
- Message: ‘geckodriver’ executable needs to be in PATH. [Solved]
- [Solved] Errors reported by genymotion, UI autoviewer and appium
- [Solved] Stderr: ‘Failure [INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed to parse…