0

I have written a code for parallel programming in python.I am using pp module for this.

job_server = pp.Server(ncpus, ppservers=ppservers)

where ncpus=8 which is no. of core in my system.

python version:2.6.5.

pp version:1.6.2.

But I am facing an error as follows,

Traceback (most recent call last):
File "/home/a3rmt/LIVE_ECG/file_video.py", line 613, in <module>
  MakeImagesThread(array_file)
File "/home/a3rmt/LIVE_ECG/file_video.py", line 502, in MakeImagesThread
  job_server = pp.Server(ncpus, ppservers=ppservers)
File "/usr/lib/pymodules/python2.6/pp.py", line 366, in __init__
  raise ValueError("secret must be set using command-line option or configuration file")
ValueError: secret must be set using command-line option or configuration file
Josh Lee
  • 171,072
  • 38
  • 269
  • 275
user1372331
  • 37
  • 1
  • 5

3 Answers3

0

As the manual explains you need to provide a secret key to keep the communications between the process secure.

Anthon
  • 69,918
  • 32
  • 186
  • 246
0

Try:

job_server = pp.Server(ncpus, ppservers=ppservers, secret="password") 

Where 'password' is your secret, used when setting the ppserver, eg.

ppserver -s password

Melroy van den Berg
  • 2,697
  • 28
  • 31
0

Seems like this is a problem with older versions of pp (version < 1.6.4) . I reinstalled pp version 1.6.4 manually and the issue was gone . the link for download is : https://pypi.python.org/pypi/pp

amit12690
  • 159
  • 1
  • 7