-
Notifications
You must be signed in to change notification settings - Fork 69
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
TypeError: cannot pickle '_thread.lock' object #5
Comments
I'm not able to reproduce the above pickle issue in my below setup:
Can you let me know your OS and Python version details? |
The OS is Windows 10 |
Yes. We are facing the same issue too. |
But we actually fixed the issue in Windows. Let us know if you want the code. |
@sriraj1122 definitely kindly provide the code. |
@sriraj1122 |
@sriraj1122 is it possible to share the code that works on windows/address the pickle'thread' issue? Thanks |
would be helpful if you could post the code here or create a PR. |
@ranjanrak It seems the issue is still present. I have tried in macos. |
you need to remove the volume key from the below code in on_ticks. |
Hi,
I tried to upgrade the python package and run v0.5, but again it's showing the following error:
TypeError Traceback (most recent call last)
in
10 # Stream option chain data in real-time
11 StreamData = OptionStream.create_option_chain()
---> 12 for data in StreamData:
13 print(data)
~\anaconda3\lib\site-packages\optionchain_stream\option_chain.py in create_option_chain(self)
30 self.socketClient = WebsocketClient(self.api_key, self.api_secret, self.request_token, self.symbol, self.expiry)
31 # create streaming websocket data
---> 32 self.socketClient.queue_callBacks()
33 # Keep fetching streaming Queue
34 while 1:
~\anaconda3\lib\site-packages\optionchain_stream\websocket.py in queue_callBacks(self)
92 """
93 # Process to keep updating real time tick to DB
---> 94 Process(target=self.assign_callBacks,).start()
95 # Delay to let intial instrument DB sync
96 # For option chain to fetch value
~\anaconda3\lib\multiprocessing\process.py in start(self)
119 'daemonic processes are not allowed to have children'
120 _cleanup()
--> 121 self._popen = self._Popen(self)
122 self._sentinel = self._popen.sentinel
123 # Avoid a refcycle if the target function holds an indirect
~\anaconda3\lib\multiprocessing\context.py in _Popen(process_obj)
222 @staticmethod
223 def _Popen(process_obj):
--> 224 return _default_context.get_context().Process._Popen(process_obj)
225
226 class DefaultContext(BaseContext):
~\anaconda3\lib\multiprocessing\context.py in _Popen(process_obj)
325 def _Popen(process_obj):
326 from .popen_spawn_win32 import Popen
--> 327 return Popen(process_obj)
328
329 class SpawnContext(BaseContext):
~\anaconda3\lib\multiprocessing\popen_spawn_win32.py in init(self, process_obj)
91 try:
92 reduction.dump(prep_data, to_child)
---> 93 reduction.dump(process_obj, to_child)
94 finally:
95 set_spawning_popen(None)
~\anaconda3\lib\multiprocessing\reduction.py in dump(obj, file, protocol)
58 def dump(obj, file, protocol=None):
59 '''Replacement for pickle.dump() using ForkingPickler.'''
---> 60 ForkingPickler(file, protocol).dump(obj)
61
62 #
TypeError: cannot pickle '_thread.lock' object
Kindly let us know what could be the issue?
Thanks in advance
The text was updated successfully, but these errors were encountered: