-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pandarallel is failing with SSLContext error #267
Comments
Please include a minimal, self-contained example to reproduce your bug.
Is it possible to re-write your function so that it doesn't use any |
My code looks like this.
|
Okay... instead of returning the response, could you perhaps extract the message from (I'm assuming your original code returns the response... Your code as-is does not run and |
I tried it. Facing the same error. |
I have upgraded openai from 0.28.0 to openai==1.23.5.
My parallel calls to openai with Pandarallel was working well with openai==0.28.0 version.
But failing with the below error after upgrading to openai==1.23.5
File "/app/imssumm/Summ_parallel.py", line 239, in call_iterative_summ_logic
prompt_df_1["result"] = prompt_df_1.parallel_apply(lambda x: self.summarize(x["to_be_summarized"],x["token_len"]), axis=1)
File "/usr/local/lib/python3.8/site-packages/pandarallel/core.py", line 265, in closure
dilled_user_defined_function = dill.dumps(user_defined_function)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 263, in dumps
dump(obj, file, protocol, byref, fmode, recurse, **kwds)#, strictio)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 235, in dump
Pickler(file, protocol, **_kwds).dump(obj)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 394, in dump
StockPickler.dump(self, obj)
File "/usr/lib64/python3.8/pickle.py", line 487, in dump
self.save(obj)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 560, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 1824, in save_function
_save_with_postproc(pickler, (_create_function, (
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 1089, in _save_with_postproc
pickler.save_reduce(*reduction)
File "/usr/lib64/python3.8/pickle.py", line 692, in save_reduce
save(args)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 560, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/lib64/python3.8/pickle.py", line 886, in save_tuple
save(element)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 603, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/python3.8/pickle.py", line 717, in save_reduce
save(state)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 560, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 1186, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/usr/lib64/python3.8/pickle.py", line 971, in save_dict
self._batch_setitems(obj.items())
File "/usr/lib64/python3.8/pickle.py", line 997, in _batch_setitems
save(v)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 603, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/python3.8/pickle.py", line 717, in save_reduce
save(state)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 560, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 1186, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/usr/lib64/python3.8/pickle.py", line 971, in save_dict
self._batch_setitems(obj.items())
File "/usr/lib64/python3.8/pickle.py", line 997, in _batch_setitems
save(v)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 603, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/python3.8/pickle.py", line 717, in save_reduce
save(state)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 560, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 1186, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/usr/lib64/python3.8/pickle.py", line 971, in save_dict
self._batch_setitems(obj.items())
File "/usr/lib64/python3.8/pickle.py", line 997, in _batch_setitems
save(v)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 603, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/python3.8/pickle.py", line 717, in save_reduce
save(state)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 560, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 1186, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/usr/lib64/python3.8/pickle.py", line 971, in save_dict
self._batch_setitems(obj.items())
File "/usr/lib64/python3.8/pickle.py", line 1002, in _batch_setitems
save(v)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 603, in save
self.save_reduce(obj=obj, *rv)
File "/usr/lib64/python3.8/pickle.py", line 717, in save_reduce
save(state)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 560, in save
f(self, obj) # Call unbound method with explicit self
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 1186, in save_module_dict
StockPickler.save_dict(pickler, obj)
File "/usr/lib64/python3.8/pickle.py", line 971, in save_dict
self._batch_setitems(obj.items())
File "/usr/lib64/python3.8/pickle.py", line 997, in _batch_setitems
save(v)
File "/usr/local/lib/python3.8/site-packages/dill/_dill.py", line 388, in save
StockPickler.save(self, obj, save_persistent_id)
File "/usr/lib64/python3.8/pickle.py", line 578, in save
rv = reduce(self.proto)
TypeError: cannot pickle 'SSLContext' object
The text was updated successfully, but these errors were encountered: