I'm encountering an issue while running a Python script on Linux systems (both CentOS and Ubuntu) using code similar to the following:
import os
import cloudpickle
filename = 'name.ext'
assert(os.path.isfile(filename))
with open(filename, 'rb') as file:
deserialized_object = cloudpickle.load(file)
However, I'm consistently getting the following error:
Traceback (most recent call last):
File "/home/tslever/Bayesian_Docking-Score_Predictor/Load_PyMC_Model_And_Training_Inference_Data_And_Create_Visualizations.py", line 155, in <module>
main(
File "/home/tslever/Bayesian_Docking-Score_Predictor/Load_PyMC_Model_And_Training_Inference_Data_And_Create_Visualizations.py", line 73, in main
pymc_model = cloudpickle.load(file)
File "/usr/lib/python3.10/multiprocessing/managers.py", line 942, in RebuildProxy
return func(token, serializer, incref=incref, **kwds)
File "/usr/lib/python3.10/multiprocessing/managers.py", line 792, in __init__
self._incref()
File "/usr/lib/python3.10/multiprocessing/managers.py", line 846, in _incref
conn = self._Client(self._token.address, authkey=self._authkey)
File "/usr/lib/python3.10/multiprocessing/connection.py", line 502, in Client
c = SocketClient(address)
File "/usr/lib/python3.10/multiprocessing/connection.py", line 630, in SocketClient
s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory
I've ensured that the file name.ext exists by using os.path.isfile(), yet the cloudpickle.load() method encounters a FileNotFoundError. I'm uncertain about the cause of this issue and how to resolve it.
Can anyone provide insights or suggestions on how to fix this problem? Any help would be greatly appreciated.