codechecker
codechecker copied to clipboard
TypeError: cannot pickle '_thread._local' object
Describe the bug
When I use the command codechecker server
I got this error. Here are the details:
[INFO 2022-02-24 18:34] - Checking configuration database ...
[INFO 2022-02-24 18:34] - Database is up to date.
[INFO 2022-02-24 18:34] - Status of products:
-------------------------------------------------------------------------------------------------------------------------------------------------------
Product endpoint | Database status | Database location | Schema version in the database | Schema version in the package
-------------------------------------------------------------------------------------------------------------------------------------------------------
Default | Database is up to date. | /Users/debris/.codechecker/Default.sqlite | fb356f0eefed (up to date) | fb356f0eefed
-------------------------------------------------------------------------------------------------------------------------------------------------------
[INFO 2022-02-24 18:34] - Garbage collection for product 'Default' started...
[INFO 2022-02-24 18:34] - Garbage collection finished.
[INFO 2022-02-24 18:34] - Searching for SSL key at /Users/debris/.codechecker/key.pem, cert at /Users/debris/.codechecker/cert.pem, not found...
[INFO 2022-02-24 18:34] - Falling back to simple, insecure HTTP.
[INFO 2022-02-24 18:34] - Server waiting for client requests on [localhost:8001]
Traceback (most recent call last):
File "/Users/debris/miniconda3/lib/python3.8/site-packages/codechecker_common/cli.py", line 208, in main
sys.exit(args.func(args))
File "/Users/debris/miniconda3/lib/python3.8/site-packages/codechecker_server/cmd/server.py", line 436, in __handle
main(args)
File "/Users/debris/miniconda3/lib/python3.8/site-packages/codechecker_server/cmd/server.py", line 1002, in main
server_init_start(args)
File "/Users/debris/miniconda3/lib/python3.8/site-packages/codechecker_server/cmd/server.py", line 972, in server_init_start
server.start_server(args.config_directory,
File "/Users/debris/miniconda3/lib/python3.8/site-packages/codechecker_server/server.py", line 1092, in start_server
p.start()
File "/Users/debris/miniconda3/lib/python3.8/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Users/debris/miniconda3/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/Users/debris/miniconda3/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/Users/debris/miniconda3/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/Users/debris/miniconda3/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/Users/debris/miniconda3/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/Users/debris/miniconda3/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_thread._local' object
CodeChecker version 6.18.0
To Reproduce Steps to reproduce the behaviour:
- Run command 'codechecker server'
- See error
Expected behaviour I want to start the service and visit the webpage of codechecker through typing http://localhost:8001 in my browser.
Desktop (please complete the following information)
- OS: macOS Big Sur Version 11.4
- Browser: Chrome
Additional context
I install the codechecker through the command pip install codechecker
according to here
The version of pip :
->pip -V
pip 21.3.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)
There seems something wrong with the _Popen function in File "/Users/debris/miniconda3/lib/python3.8/multiprocessing/process.py" at line 77:
def _Popen(self):
raise NotImplementedError
But I don't know how to fix it
I encountered the same error on MacOS Monterey. Was able to get the server to run by using python3.7.