SharebeeClub / TCP-IP-CR-Python-CMD

Demo of CR, Python package based on TCP/IP protocol, command line operation mode
MIT License
0 stars 0 forks source link

BrokenPipeError: [Errno 32] Broken pipe #7

Open Samuel-wei opened 1 year ago

Samuel-wei commented 1 year ago

Output Error:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/Users/samuelwei/anaconda3/envs/DeepLearning/lib/python3.9/tkinter/__init__.py", line 1892, in __call__
    return self.func(*args)
  File "/Users/samuelwei/Documents/workspace/ArtificialIntelligence/DOBOT/TCP-IP-Nova-Python/ui.py", line 415, in movl
    self.client_dash_move.MovL(float(self.entry_dict["X:"].get()), float(self.entry_dict["Y:"].get()), float(self.entry_dict["Z:"].get()),
  File "/Users/samuelwei/Documents/workspace/ArtificialIntelligence/DOBOT/TCP-IP-Nova-Python/dobot_api.py", line 509, in MovL
    self.send_data(string)
  File "/Users/samuelwei/Documents/workspace/ArtificialIntelligence/DOBOT/TCP-IP-Nova-Python/dobot_api.py", line 146, in send_data
    self.socket_dobot.send(str.encode(string, 'utf-8'))
BrokenPipeError: [Errno 32] Broken pipe
Samuel-wei commented 1 year ago

The BrokenPipeError is a type of error that occurs when a process tries to write to a pipe (a communication channel between two processes) that has been closed on the other end. This can happen when a process that is reading from the pipe terminates unexpectedly or closes the pipe before the writing process has finished writing. The error message "BrokenPipeError: [Errno 32] Broken pipe" indicates that the writing process has encountered a broken pipe and cannot continue writing to it. This can happen in various situations, such as when a network connection is lost, when a file descriptor is closed unexpectedly, or when a subprocess terminates unexpectedly. To fix this error, you may need to check the status of the pipe and make sure that it is open and available for writing. You may also need to handle any exceptions that may occur when writing to the pipe, such as IOError or OSError, and take appropriate action to recover from the error. Additionally, you may need to check the code for any potential race conditions or synchronization issues that could cause the pipe to be closed unexpectedly.