Error while running cell profiler on linux

Hi,
when I try to run Cell profiler on linux I get the following error:

File “CellProfiler.py”, line 320
webpage_path = options.output_directory if options.output_directory else None
^
SyntaxError: invalid syntax

can yo please tell me what is the problem?
Thank you,
Roni

Hi Roni,
Is this error what you get when you type “python CellProfiler.py” from the command line?
-Mark

I can confirm I’ve just seen the same error message when trying to run a cluster job using SGE. For some reason it doesn’t appear consistently. The command I was running was python /usr/prog/cellprofiler/2.x.10821/CellProfiler/CellProfiler.py -p Batch_data.mat -c -r -b -f $SGE_TASK_ID -l $SGE_TASK_ID

The output from from the job:

-bash-3.2$ cat CellProfiler.o1401489.194 File "/usr/prog/cellprofiler/2.x.10821/CellProfiler/CellProfiler.py", line 240 webpage_path = options.output_directory if options.output_directory else None ^ SyntaxError: invalid syntax

We’re running Python 2.6.6 on RHEL 5.4.

I have some more information which might be useful. When trying to save a batch file I see this error message in the terminal window:

Failed to collect batch information for module ExportToDatabase Traceback (most recent call last): File "/mnt/XI/prog/cellprofiler/2.x.11364/cellprofiler/pipeline.py", line 1426, in prepare_to_create_batch fn_alter_path) TypeError: prepare_to_create_batch() takes exactly 4 arguments (3 given)

I then took the batch file and tried to launch it on the cluster via SGE and got the same error as in my previous post.

It turns out this is a PEBKAC error :smile: I had too many terminal windows open and was firing up CP from one with the default RHEL python. It’d be good if CP would check that the version of Python is high enough to run CP before it starts.