lopq
lopq copied to clipboard
When I run the program in windows,i have an error
PicklingError: Can't pickle <function func_wrap at 0x000000000A976C18>: it's not found as lopq.utils.func_wrap
and when i fixed this problem i get Traceback (most recent call last):
File "
File "C:\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 699, in runfile execfile(filename, namespace)
File "C:\Anaconda2\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 74, in execfile exec(compile(scripttext, filename, 'exec'), glob, loc)
File "C:/Users/Saber/Desktop/lopqtest.py", line 32, in
File "C:\Anaconda2\lib\site-packages\lopq\search.py", line 98, in add_data codes = compute_codes_parallel(data, self.model, num_procs)
File "C:\Anaconda2\lib\site-packages\lopq\utils.py", line 182, in compute_codes_parallel codes = parmap(compute_partition, partitions, num_procs)
File "C:\Anaconda2\lib\site-packages\lopq\utils.py", line 136, in parmap p.start()
File "C:\Anaconda2\lib\multiprocessing\process.py", line 130, in start self._popen = Popen(self)
File "C:\Anaconda2\lib\multiprocessing\forking.py", line 277, in init dump(process_obj, to_child, HIGHEST_PROTOCOL)
File "C:\Anaconda2\lib\multiprocessing\forking.py", line 199, in dump ForkingPickler(file, protocol).dump(obj)
File "C:\Anaconda2\lib\pickle.py", line 224, in dump self.save(obj)
File "C:\Anaconda2\lib\pickle.py", line 331, in save self.save_reduce(obj=obj, *rv)
File "C:\Anaconda2\lib\pickle.py", line 425, in save_reduce save(state)
File "C:\Anaconda2\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self
File "C:\Anaconda2\lib\pickle.py", line 655, in save_dict self._batch_setitems(obj.iteritems())
File "C:\Anaconda2\lib\pickle.py", line 687, in _batch_setitems save(v)
File "C:\Anaconda2\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self
File "C:\Anaconda2\lib\pickle.py", line 568, in save_tuple save(element)
File "C:\Anaconda2\lib\pickle.py", line 331, in save self.save_reduce(obj=obj, *rv)
File "C:\Anaconda2\lib\pickle.py", line 425, in save_reduce save(state)
File "C:\Anaconda2\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self
File "C:\Anaconda2\lib\pickle.py", line 655, in save_dict self._batch_setitems(obj.iteritems())
File "C:\Anaconda2\lib\pickle.py", line 687, in _batch_setitems save(v)
File "C:\Anaconda2\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self
File "C:\Anaconda2\lib\pickle.py", line 554, in save_tuple save(element)
File "C:\Anaconda2\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self
File "C:\Anaconda2\lib\pickle.py", line 606, in save_list self._batch_appends(iter(obj))
File "C:\Anaconda2\lib\pickle.py", line 639, in _batch_appends save(x)
File "C:\Anaconda2\lib\pickle.py", line 331, in save self.save_reduce(obj=obj, *rv)
File "C:\Anaconda2\lib\pickle.py", line 425, in save_reduce save(state)
File "C:\Anaconda2\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self
File "C:\Anaconda2\lib\pickle.py", line 568, in save_tuple save(element)
File "C:\Anaconda2\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self
File "C:\Anaconda2\lib\pickle.py", line 492, in save_string self.write(BINSTRING + pack("<i", n) + obj)
IOError: [Errno 32] Broken pipe
I'm afraid I cannot help you - I have no idea what code you are trying to run.
One idea is to run python example.py
from within the scripts/
directory in this repo. That runs a very basic test of model fitting.
thank you for you answer.when I run python example.py ,I also have a problem :PicklingError: Can't pickle <function func_wrap at 0x000000000AAF63C8>: it's not found as lopq.utils.func_wrap.what's the reason for this issue.
This is very strange because there is no pickling involved anywhere in example.py
. I am not familiar with Python on windows, but perhaps you should try test whether your Anaconda installation is correct?
Thank you for you answer.I can confirm the anaconda installation is no problem.I found the function named 'func_warp' is a nested function in the function 'parmap' in utils.py.Whether the reason is the different handling mechanism between the Win and Linux? I guess...
I just met up with the same problem, did u figure it out?
@Hugh0120 did you solved the issue? I am facing the same problem? thanks
@Hugh0120 did you solved the issue? I am facing the same problem? thanks
well, actually I didn't fix the issue and finally used another library called FAISS, hope that could help.