Skip to content
This repository has been archived by the owner on May 1, 2020. It is now read-only.

When I run the program in windows,i have an error #12

Open
FoolishBrown opened this issue Dec 14, 2016 · 7 comments
Open

When I run the program in windows,i have an error #12

FoolishBrown opened this issue Dec 14, 2016 · 7 comments

Comments

@FoolishBrown
Copy link

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 "", line 1, in
runfile('C:/Users/Saber/Desktop/lopqtest.py', wdir='C:/Users/Saber/Desktop')

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
searcher.add_data(data)

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

@pumpikano
Copy link
Collaborator

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.

@FoolishBrown
Copy link
Author

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.

@pumpikano
Copy link
Collaborator

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?

@FoolishBrown
Copy link
Author

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...

@Hugh0120
Copy link

I just met up with the same problem, did u figure it out?

@anas-899
Copy link

anas-899 commented Oct 16, 2019

@Hugh0120 did you solved the issue? I am facing the same problem?
thanks

@Hugh0120
Copy link

Hugh0120 commented Nov 4, 2019

@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.

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

No branches or pull requests

4 participants