CP3.1.8 does not open in Windows 10

Hi All, I just installed CP3.1.8 on a new Windows 10 machine (Windows 10 Enterprise v 10.015063) running the laste version of Java 8.

The black screen of the CP comes up and closes itself quickly. I can only read at the end of the text “Failed…”. I cannot rrad the rest because the black window closes too fast.

Any idea how to fix this?
Thank you!

Hi All,
I’ve got the same problem on a Windows 10 machine (CP3.1.8, Windows 10 Enterprise v 1809, international version with some german settings). On my private Win10 notebook it runs fine (Win 10 Pro v17763.253).
On my work desktop machine it crashes as described with the following message:
“LookupError: unknown encoding: cp65001”

It seems to be related to the Windows-Version. I had the same Problem already with CP3.1.5. on the same machine. Our IT department could not help.

In search for a solution I found a python issue on github on that topic (https://github.com/docker/compose/issues/2775), but I had no clue how to make use of that. Maybe it helps you?

Best regards,

We have the exactly the same issue with CP3.1.8 on a Windows 7 machine, and it seems to be machine- and user-dependent. On some computers CP3.1.8 works fine, and even on the same machine, only some users will get this error. In some cases CP2.2.0 will run even when CP3.1.8 will not. Our IT department could not help either. They swear it is not related to their security enhancements, but I fear they might have locked something to prevent malicious software from taking over.

It seems to be dependent on Windows-Updates. Now 3.1.5. is no more working on another machine with WIN10 after the last win update, where it worked before. The error message here was different:

I reinstalled 3.1.8. and got the following error:
Windows 10 Pro
Version 1803 Build 17134.590

Any Idea?


As the error message indicates it can’t find the JDK. There are a number of potential reasons for this. The javabridge code is looking for the environment variable JDK_HOME and (if not found) for registry keys (see here https://github.com/LeeKamentsky/python-javabridge/blob/master/javabridge/locate.py). Might be worth checking Environment Variables under Advanced System Settings on Windows 10. When I had a similar problem recently, I removed Cellprofiler, removed some JAVA/JDK related variables in my user-specific environment and reinstalled Cellprofiler and that fixed it. Beware of potential side-effects with whatever software installer put those environmnet variables there in the first place.

Edited to add that this is only re: @TorCK 's previous post. The first two messages of this thread appear to be unrelated.

1 Like

LookupError: unknown encoding: cp65001

I can reproduce this on newer Windows 10 systems when “Beta: Use Unicode UTF-8 for worldwide language support” is enabled in Control Panel - Region - Administrative - Change system locale - Region Settings. This seems to be an issue when scripts using matplotlib (and possibly other libraries dealing with locale) are packaged with PyInstaller. CP-3.1.8 and matplotlib seem to work fine when not packaged with PyInstaller.


Many thanks to you all.
The hint by @cgohlke worked for me. Disabling “Beta: Use Unicode UTF-8 for worldwide language support” in Control Panel - Region - Administrative - Change system locale - Region Settings enabled the normal start of cell profiler!

It worked on my first reported system with enterprise WIn10. I did not try it yet on the second system. I will report this after testing.

Thanks a lot :slight_smile:

1 Like

I tried the @cgohlke solution on my second system, where the java issue popped up. Here it didn’t work. I will work here with @VolkerH hints. Keep you updated.
Best regards, Torsten

Also for the second system with the Java related error message, I found a solution.
Based on @VolkerH hints I checked the environment variables JDK_HOME and JAVA_HOME in the Windows-Shell (CMD.exe) with the command set JDK_HOME which displayed the variable.
The variable was JDK_HOME=C:\Program Files (x86)\CellProfiler3\java .But this was not the place where cellprofiler was installed to (“C:\Program Files (x86)\CellProfiler\java”). I tried to change the variable with set JAVA_HOME=C:\Program Files (x86)\CellProfiler\java and accordingly also JDK_HOME. This worked to change the variabel in the shell but it had no effect to cellprofiler. After restarting the system the environment variables were again the old. If I can’t change the path variable then maybe the location where cellprofiler is expected. Deinstalling Cellprofiler and installing it in the suggested location “C:\Program Files (x86)\CellProfiler3\java” resolved the issue and cellprofiler started.

But I’m still puzzled why the installed version 3.1.5 first worked and suddenly no more. Anyway.

Thanks to all!


FWIW, we use the following batch file to start CellProfiler from a network share in a multi-user environment. It works around some startup issues with the current version of Cellprofiler. The script must be located in the CellProfiler installation directory:

@echo off
title CellProfiler Console
set CP_JAVA_HOME=%~dp0\java
cd /D %TEMP%
%~dp0\CellProfiler.exe %*