Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No emojis on Windows10 #15

Open
mborus opened this issue Mar 5, 2019 · 6 comments
Open

No emojis on Windows10 #15

mborus opened this issue Mar 5, 2019 · 6 comments
Labels
ext:topbar-text TopBar Text Extension

Comments

@mborus
Copy link

mborus commented Mar 5, 2019

Hi,

as promised, some Feedback on the behavior in Windows 10.

Installation works fine. If you don't have Jupyter on your system path, it helps to run the installation from the location where Jupyter is installed, for example "c:\Python37\scripts"

Alas, so far no emojis:

The default text shows as
"Hi There 👋"

If you go into Settings / Top Bar Text / User Override, you can paste emojis like "🐍", but trying to save them throws

"Your changes were not saved.
Invalid response: 500 Internal Server Error"

As a work around, trying to enter \xf0\x9f\x90\x8d will grey out the save button.

Showing normal text works fine.

@jtpio
Copy link
Member

jtpio commented Mar 5, 2019

Thanks for trying it out @mborus!

It looks like it's giving this error when trying to save the settings file to disk.

Do the server logs show any more details?
Would you mind trying to use an emoji for the custom shortcuts as well? Something like this:

image

@jtpio jtpio added the ext:topbar-text TopBar Text Extension label Mar 5, 2019
@mborus
Copy link
Author

mborus commented Mar 5, 2019

Do the server logs show any more details?
I'm not sure where I should look for logs, do you know where they are located?

Would you mind trying to use an emoji for the custom shortcuts as well? Something like this:
Same problem, can paste but not save. Again, Server error.

@jtpio
Copy link
Member

jtpio commented Mar 5, 2019

I'm not sure where I should look for logs, do you know where they are located?

In the terminal that starts the Jupyter server? (although it can be slightly different on Windows)

@mborus
Copy link
Author

mborus commented Mar 5, 2019

Below, the error message when saving a message with "🐍"

[E 22:13:33.833 LabApp] 500 PUT /lab/api/settings/@jupyterlab/shortcuts-extension:plugin?1551820411370 (::1) 2448.59ms referer=http://localhost:8891/lab
[E 00:37:04.398 LabApp] Uncaught exception PUT /lab/api/settings/jupyterlab-topbar-text:plugin?1551829024390 (::1)
HTTPServerRequest(protocol='http', host='localhost:8891', method='PUT', uri='/lab/api/settings/jupyterlab-topbar-text:plugin?1551829024390', version='HTTP/1.1', remote_ip='::1')
Traceback (most recent call last):
File "c:\python37\lib\site-packages\tornado\web.py", line 1541, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "c:\python37\lib\site-packages\notebook\base\handlers.py", line 677, in wrapper
return method(self, args, **kwargs)
File "c:\python37\lib\site-packages\tornado\web.py", line 2949, in wrapper
return method(self, args, **kwargs)
File "c:\python37\lib\site-packages\jupyterlab_server\settings_handler.py", line 260, in put
fid.write(raw)
File "c:\python37\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f40d' in position 223: character maps to
[W 00:37:04.404 LabApp] Unhandled error
[E 00:37:04.406 LabApp] {
"Host": "localhost:8891",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0",
"Accept": "
/
",
"Accept-Language": "en-US,en;q=0.5",
"Accept-Encoding": "gzip, deflate",
"Referer": "http://localhost:8891/lab",
"Content-Type": "application/json",
"Authorization": "token ed8c4d99f4ede70091dd73ddad5d02c2db2c8f07b9831a3d",
"Origin": "http://localhost:8891",
"Content-Length": "221",
"Connection": "keep-alive",
"Cookie": "username-localhost-8888="2|1:0|10:1550526357|23:username-localhost-8888|44:MGM0NDljOTQzOWFlNDM0MDhiMzU0NjBiYWUxZTQ3OWU=|a181986a963c0d5d9e0c9937194a443adf39a4ac39d9e2b37b97f7e7e5b22290"; username-localhost-8889="2|1:0|10:1551829022|23:username-localhost-8889|44:MDZhZWEwZjMyMGE0NGQ1ZjgyZDAwNzE2YWE0Y2RlNzc=|f039e542fd7caf1c219850c2f604dd252bd3b68710a8dde2601a66b76356cce7"; username-localhost-8890="2|1:0|10:1550235279|23:username-localhost-8890|44:ZGZiOGY0ZjE3YzgwNDcxNjg4NTFmM2EzZTg3NmRkYzk=|d4a50e39354847a4ff517692adc9d0f0692bd0a2360b5bfd9537e08bf5c2092a"; username-localhost-8891="2|1:0|10:1551829022|23:username-localhost-8891|44:OWUxYzQ3ZGQ4ZDU4NDkwYmI2ZTc2MDViNzMwM2IxNmM=|356ee28afca16b461d85d959f99598d62b4b7264ec62eb1b064b1c5a1a029401"; username-localhost-8892="2|1:0|10:1550244442|23:username-localhost-8892|44:YzUwZWYxMTMwNmUxNGI3MjgwMzJjNmQ4NmQ1NDAxZjY=|2184ab6157ee357cb2c0bdb54e26e78110a0aac578d86a504138025497f2a4b4"; username-localhost-8893="2|1:0|10:1550937477|23:username-localhost-8893|44:YzBiYzI3Nzg0MTMyNGUyMmJlNGY1M2Y1ZWMxMzg3Yzg=|caad8c7e1bf14f8c3947cb8d33fa53c1c488493ab2c3f4aed5d55928c3cc113f"; username-localhost-8880="2|1:0|10:1551808142|23:username-localhost-8880|44:YTE0NWMxZThkZmNkNGYyNjhmMDkyNTMyMjNmZjg4Y2I=|b34bb4e10f1c620f503c721756aa581f930dd796996c67ebad1e608f1695cbcf"; username-localhost-8979="2|1:0|10:1551782361|23:username-localhost-8979|44:N2Y5OGQzZGRjMmRhNGM1NGFkNDZlNTc5MTJhN2Q0ZDM=|534b813efa8d03d769349393e1e555311c82d9164984d2639bee1072b3ec7e33"; _xsrf=2|35066134|00f2da99bb9d9d9aea998f5c1f1feb33|1551769469; username-localhost-8791="2|1:0|10:1551808151|23:username-localhost-8791|44:MmI3NTc3M2NiYmRjNDJmYWE3Y2I3OWZkMzg0M2UwNmU=|efa67a8b5e26059070c6b6ce4397297296f852f902249781161386828e648900"; username-localhost-8869="2|1:0|10:1551809680|23:username-localhost-8869|44:OTAyMjY1MWMyOTNiNDhjMzkyOTg5ZTBkNDhjY2U0YjA=|3a49e5e2949f20732e5cf94126ef477c633abe48cb6b804e909a1f07b18a0480"",
"Pragma": "no-cache",
"Cache-Control": "no-cache"
}
[E 00:37:04.411 LabApp] 500 PUT /lab/api/settings/jupyterlab-topbar-text:plugin?1551829024390 (::1) 9.97ms referer=http://localhost:8891/lab

@jtpio
Copy link
Member

jtpio commented Apr 15, 2019

@mborus if it's happening with other core JupyterLab extensions, it might related to how the json file is encoded and saved to disk on Windows.

Maybe someone has the similar problem. Worth checking on https://github.com/jupyterlab/jupyterlab or open a new issue.

@raybellwaves
Copy link

Also came across this. At at least when opening I see the same thing "Hi There 👋". Don't suppose there has been any update on this re. this package or jupyterlab?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ext:topbar-text TopBar Text Extension
Projects
None yet
Development

No branches or pull requests

3 participants