Skip to content
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 '_curses.window' object #115

Closed
raviandri opened this issue Aug 31, 2021 · 4 comments
Closed

TypeError: cannot pickle '_curses.window' object #115

raviandri opened this issue Aug 31, 2021 · 4 comments

Comments

@raviandri
Copy link

raviandri commented Aug 31, 2021

Dear Junzis,

Very appreciate with pyModeS that could give me interesting use case as a noob on python.
I tried to run modeslive on windows environment but found error like this:

Traceback (most recent call last):
File "C:\Users*\AppData\Local\Programs\Python\Python39\Lib\site-packages\pyModeS\streamer\modeslive.py", line 140, in
screen_process.start()
File "C:\Users*
\AppData\Local\Programs\Python\Python39\lib\multiprocessing\process.py", line 121, in start
self._popen = self._Popen(self)
File "C:\Users*\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users*
\AppData\Local\Programs\Python\Python39\lib\multiprocessing\context.py", line 327, in _Popen
return Popen(process_obj)
File "C:\Users**\AppData\Local\Programs\Python\Python39\lib\multiprocessing\popen_spawn_win32.py", line 93, in init
reduction.dump(process_obj, to_child)
File "C:\Users\r**\AppData\Local\Programs\Python\Python39\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_curses.window' object

but otherwise on linux, the script can run well.

I've add pip install windows-curses but still can't work.

Is there any concern for windows environment?

@junzis
Copy link
Owner

junzis commented Oct 8, 2021

I guess maybe you can try the Windows Linux Subsystem? https://docs.microsoft.com/en-us/windows/wsl/

Sorry that I don't have a better recommendation, since I haven't used windows for a very long time...

@junzis junzis closed this as completed Jul 9, 2022
@paulmadejong
Copy link
Contributor

I ran into the same issue on macOS and adding multiprocessing.set_start_method("fork") at the top (before any call that uses multiprocessing) fixed it for me.

@raviandri
Copy link
Author

Thanks for your suggestion @paulmadejong. Will try it

@appaie
Copy link

appaie commented Feb 21, 2024

hey ive got a similar problem
Windows Python 3.11.8 In PyCharm environment
`Package Version


numpy 1.26.4
pip 23.2.1
pymodes 2.17
pyrtlsdr 0.3.0
pyrtlsdrlib 0.0.2
pyzmq 24.0.1
setuptools 68.2.0
wheel 0.41.2
windows-curses 2.3.2`

i get this error:
File "E:\JetBrains\PycharmProjects\Diplomarbeit_Radar_im-Eigenheim\.venv\Scripts\modeslive.exe\__main__.py", line 7, in <module> File "E:\JetBrains\PycharmProjects\Diplomarbeit_Radar_im-Eigenheim\.venv\Lib\site-packages\pyModeS\streamer\modeslive.py", line 139, in main recv_process.start() File "E:\Python\Lib\multiprocessing\process.py", line 121, in start self._popen = self._Popen(self) ^^^^^^^^^^^^^^^^^ File "E:\Python\Lib\multiprocessing\context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Python\Lib\multiprocessing\context.py", line 336, in _Popen return Popen(process_obj) ^^^^^^^^^^^^^^^^^^ File "E:\Python\Lib\multiprocessing\popen_spawn_win32.py", line 95, in __init__ reduction.dump(process_obj, to_child) File "E:\Python\Lib\multiprocessing\reduction.py", line 60, in dump ForkingPickler(file, protocol).dump(obj) ValueError: ctypes objects containing pointers cannot be pickled

did the solution @paulmadejong stated fixed the issue and if yes could u explain the steps

id appreciate it thank u

best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants