The problem is that there is an error when the thread transmits data. For example, the following sentence will report an error when it runs
threading.Thread(target=intent, args=([1, 2, 3, 4])).start()
The solution is to add a comma to the last face, as follows
threading.Thread(target=intent, args=([1, 2, 3, 4],)).start()
# or
threading.Thread(target=intent, args=[[1, 2, 3, 4], ]).start()
Read More:
- [Solved] TypeError: __init__() missing 1 required positional argument: ‘on_delete’
- Django Render home error: TypeError at /render() missing 1 required positional argument: ‘template_name‘
- [Solved] Python Error: positional argument follows keyword argument
- Tensor for argument #2 ‘mat1‘ is on CPU, but expected it to be on GPU (while checking arguments for
- [Solved] Python Error: TypeError: write() argument must be str, not bytes
- [Solved] Pycharm from xx import xx Error: Unresolved reference
- [Solved] Jupyter notebook: TypeError: __init__() got an unexpected keyword argument ‘io_loop’
- Python Run Error: TypeError: hog() got an unexpected keyword argument ‘visualise‘”
- [Solved] error: when using the property decorator in Python, an error occurs: typeerror: descriptor ‘setter’ requires a ‘property’ object but
- Django Issues: TypeError: “Settings” object is irreversible
- [Solved] PyTorch Caught RuntimeError in DataLoader worker process 0和invalid argument 0: Sizes of tensors mus
- [ncclUnhandledCudaError] unhandled cuda error, NCCL version xx.x.x
- [Solved] wsgiref make_server Error: AssertionError: write() argument must be a bytes instance
- ‘c’ argument looks like a single numeric RGB or RGBA sequence, which should be avoided as value-mapp
- [Solved] Pytroch warning: “Argument interpolation should be of type InterpolationMode instead of int. “
- [Solved] RuntimeError (note: full exception trace is shown but execution is paused at: <module>)
- Python Pandas Typeerror: invalid type comparison
- TypeError: Decimal type object is not a JSON serialization solution
- [Solved] RuntimeError: expected scalar type Long but found Float
- Pytorch Error: runtimeerror: expected scalar type double but found float