UnicodeDecodeError

Hello, I just installed CPA on a 64bit Windows 7 machine. Trying the cpa_2.0_example data. ScatterPlot BoxPlot and Histogram work. But trying ImageViewer I get the Error :
An error occurred in the program:
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0x92 in position 965: ordinal not in range(128)

Traceback (most recent call last):
File “cpa.py”, line 287, in launch_image_viewer
File “imageviewer.pyc”, line 227, in init
File “imageviewer.pyc”, line 675, in OnOpenImage
File “imagetools.pyc”, line 52, in FetchImage
File “imagereader.pyc”, line 31, in ReadImages
File “imagereader.pyc”, line 112, in read_images_old_way
File “imagereader.pyc”, line 185, in ReadBitmap
File “imagereader.pyc”, line 226, in GetRawData
File “logging_init_.pyc”, line 1592, in info
File “logging_init_.pyc”, line 1132, in info
File “logging_init_.pyc”, line 1250, in log
File "logging_init
.pyc", line 1260, in handle
File “logging_init_.pyc”, line 1300, in callHandlers
File “logging_init_.pyc”, line 744, in handle
File “cpa.py”, line 45, in emit
File “cpa.py”, line 222, in update

And I get black images when fetching using the Classifer

Maybe you can help me?
Thanks
Philippe

Hello Philippe,

I suspect that this has to do with non-English characters. Is it possible you have accented or other non-English characters in, say, your paths for Default Input/Output? Unfortunately CPA may not be as, shall we say, “inclusive”, as CellProfiler is, as far as character sets. If that seems plausible, you would have to change your paths, re-run CellProfiler and CPA. Or at least change the paths to your inputs and outputs, as well as in the database that point to them which CPA references.

Let us know if this helps.
David

Hello David,
Thanks a lot for your answer. Here is how it is now :

  1. I uninstalled Java, CP and CPA, then downloaded and installed Java (64bit, I guess), CP and finally CPA again
  2. I used CP on my own images of DAPI stained cells, made a pipeline IdentifyObjects, MeasureObjectSizeShape etc and ExportToDatabase. Folder paths are different than before although they still start with C:\Users\PhilippeC\Desktop\
  3. Then I opened CPA, Classifier.
    I still have the UnicodeDecode Error message window; in addition the CPA window displays :
    File “cellprofiler\utilities\javabridge.pyc”, line 10, in __load
    ImportError: DLL load failed: Le module spécifié est introuvable.
    I notice CPA talks to me in french with the accents (!!!)

Furtherdown it says :
ImageReader failed to import load_using_bioformats from CellProfiler, will fall back on PIL and TiffFile.
[TileLoader_Thread-3] SELECT Image_PathName_DAPI, Image_FileName_DAPI FROM MyExpt_Per_Image WHERE ImageNumber IN (33)
Opening image: C:\Users\PhilippeC\Desktop\141021DoxPLUS_MIPs\141021DoxPLUS_NOCOFLAVO-MIPcopy\MIP_6_dapi.tif

Despite these messages which I have ignored by just clicking OK, ImagerViewer and Classifier seem to work fine.

Tell me what you think.

Best
Philippe

[quote=“davidlogan”]Hello Philippe,

I suspect that this has to do with non-English characters. Is it possible you have accented or other non-English characters in, say, your paths for Default Input/Output? Unfortunately CPA may not be as, shall we say, “inclusive”, as CellProfiler is, as far as character sets. If that seems plausible, you would have to change your paths, re-run CellProfiler and CPA. Or at least change the paths to your inputs and outputs, as well as in the database that point to them which CPA references.

Let us know if this helps.
David[/quote]

Hello Philippe,

[quote]I notice CPA talks to me in french with the accents (!!!)
[/quote]

CPA is very cosmopolitan! :smile:

[quote]ImageReader failed to import load_using_bioformats from CellProfiler, will fall back on PIL and TiffFile.
[/quote]

That is fine. It just means that the image is not being read by BioFormats, but it is using a fallback set of image reader libraries. As long as you see the images properly in whatever tools, then you are ok.

David