celltypist
celltypist copied to clipboard
Error happened in models
Hi,
When I used any models method, I recived error :UnicodeEncodeError: 'UCS-2' codec can't encode character '\U0001f4dc' in position 0: Non-BMP character not supported in Tk
(also in position 154)
How can I fix it? It seems like a error caused by crawling web page.
`models.download_models(force_update = True)
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\logging_init_.py", line 985, in emit
stream.write(msg)
File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 362, in write
return self.shell.write(s, self.tags)
File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 604, in call
value = self.sockio.remotecall(self.oid, self.name, args, kwargs)
File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 216, in remotecall
return self.asyncreturn(seq)
File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 247, in asyncreturn
return self.decoderesponse(response)
File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 267, in decoderesponse
raise what
UnicodeEncodeError: 'UCS-2' codec can't encode character '\U0001f4dc' in position 0: Non-BMP character not supported in Tk
Call stack:
File "
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<pyshell#0>", line 1, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 474, in runcode
exec(code, self.locals)
File "<pyshell#0>", line 1, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 474, in runcode
exec(code, self.locals)
File "<pyshell#0>", line 1, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 144, in main ret = method(*args, **kwargs) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 486, in runcode print_exception() File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 234, in print_exception print_exc(typ, val, tb) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 229, in print_exc traceback.print_list(tbe, file=efile) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\traceback.py", line 25, in print_list print(item, file=file, end="") File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 362, in write return self.shell.write(s, self.tags) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 604, in call value = self.sockio.remotecall(self.oid, self.name, args, kwargs) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 216, in remotecall return self.asyncreturn(seq) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 247, in asyncreturn return self.decoderesponse(response) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 267, in decoderesponse raise what UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 156-156: Non-BMP character not supported in Tk
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 158, in main print_exception() File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 234, in print_exception print_exc(typ, val, tb) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 220, in print_exc print_exc(type(context), context, context.traceback) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 229, in print_exc traceback.print_list(tbe, file=efile) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\traceback.py", line 25, in print_list print(item, file=file, end="") File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\run.py", line 362, in write return self.shell.write(s, self.tags) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 604, in call value = self.sockio.remotecall(self.oid, self.name, args, kwargs) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 216, in remotecall return self.asyncreturn(seq) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 247, in asyncreturn return self.decoderesponse(response) File "C:\Users\anyang\AppData\Local\Programs\Python\Python37\lib\idlelib\rpc.py", line 267, in decoderesponse raise what UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 156-156: Non-BMP character not supported in Tk
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "
@anyang-kevin, it should be fixed now. Could you check?
@anyang-kevin, it should be fixed now. Could you check?
No.I still receive the same error. Should I update my package?
Now I can use MODEL in Centos system and the celltypist download from conda. But I also cant use in Windows system, which download in pip. And my Windows is chinese system. Maybe this is caused by unicode encoding? My python is 3.7.0 and celltypist version is 1.6.0. I hope it can help u to fix this bug.
I've got a guess: this is because your system interpreter (IDE, windows or Tk interface) doesn't support the emojis that CellTypist uses when printing information becase they are not part of the Basic Multilingual Plane (bmp) ?
Are you using a particular python IDE or interpreter? I noticed the pyshell#0
in the log. Possibly you can have everything in a script and simply run it with python xxx.py
from a system terminal outside the IDE or instead of using an interactive python REPL?
I've got a guess: this is because your system interpreter (IDE, windows or Tk interface) doesn't support the emojis that CellTypist uses when printing information becase they are not part of the Basic Multilingual Plane (bmp) ?
Are you using a particular python IDE or interpreter? I noticed the
pyshell#0
in the log. Possibly you can have everything in a script and simply run it withpython xxx.py
from a system terminal outside the IDE or instead of using an interactive python REPL?
Yes! Its useful. I used it in python IDLE and recived error. When I used it in windows cmd terminal, it works fine. and I saw a special symbol.
By the way, my python IDE is the original IDLE that came with python. Maybe this emoji is not suitable for windows10(Professional Edition) ?
CellTypist is most commonly used from the command line or from a notebook. We know it's been tested on VSCode and PyCharm. Would be interested in knowing if it works on the Tk interpreter (IDLE that comes with python) in more recent python versions (3.9+)?