DatePicker not handling input from Chrome on Windows 8.1

I am getting an error using DatePicker in Bokeh 0.12.[0-1] using Chrome on Windows 8.1. I input a date by clicking on the DatetimePicker drop down, but there is time and timezone information appended. The specific issue is that timezone name in the string. The DatePicker works with Chrome on Mac OS X.

value = dateutil.parser.parse(value.split(’ (’)[0]).date() is one possible (ugly) solution.

Full stack trace on the error:

2016-08-12 19:33:50,900 error handling message Message ‘PATCH-DOC’ (revision 1): ValueError(‘Unknown string format’,)

2016-08-12 19:33:50,900 message header {‘msgtype’: ‘PATCH-DOC’, ‘msgid’: ‘372FC5659B9249D8B6DDA86903FE4060’} content {‘events’: [{‘attr’: ‘value’, ‘model’: {‘type’: ‘DatePicker’, ‘id’: ‘bd1f4924-019b-40bc-9c66-218394884b3a’}, ‘new’: ‘Mon Aug 01 2016 00:00:00 GMT-0400 (Eastern Daylight Time)’, ‘kind’: ‘ModelChanged’}], ‘references’: }

Traceback (most recent call last):

File “/opt/conda/lib/python3.5/site-packages/bokeh/server/protocol/server_handler.py”, line 38, in handle

work = yield handler(message, connection)

File “/opt/conda/lib/python3.5/site-packages/tornado/gen.py”, line 1008, in run

value = future.result()

File “/opt/conda/lib/python3.5/site-packages/tornado/concurrent.py”, line 232, in result

raise_exc_info(self._exc_info)

File “”, line 3, in raise_exc_info

File “/opt/conda/lib/python3.5/site-packages/tornado/gen.py”, line 1017, in run

yielded = self.gen.send(value)

File “/opt/conda/lib/python3.5/site-packages/bokeh/server/session.py”, line 45, in _needs_document_lock_wrapper

result = yield yield_for_all_futures(func(self, *args, **kwargs))

File “/opt/conda/lib/python3.5/site-packages/bokeh/server/session.py”, line 217, in _handle_patch

message.apply_to_document(self.document)

File “/opt/conda/lib/python3.5/site-packages/bokeh/server/protocol/messages/patch_doc.py”, line 92, in apply_to_document

doc.apply_json_patch(self.content)

File “/opt/conda/lib/python3.5/site-packages/bokeh/document.py”, line 955, in apply_json_patch

patched_obj.set_from_json(attr, value, models=references)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”, line 735, in set_from_json

prop.set_from_json(self, json, models)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”, line 371, in set_from_json

models)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”, line 323, in set_from_json

return self.__set__(obj, json)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”, line 455, in set

value = self.descriptor.prepare_value(obj.__class__, self.name, value)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”, line 274, in prepare_value

value = self.transform(value)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”, line 1529, in transform

value = dateutil.parser.parse(value).date()

File “/opt/conda/lib/python3.5/site-packages/dateutil/parser.py”, line 1164, in parse

return DEFAULTPARSER.parse(timestr, **kwargs)

File “/opt/conda/lib/python3.5/site-packages/dateutil/parser.py”, line 555, in parse

raise ValueError("Unknown string format")

ValueError: Unknown string format

Hmmm…

I would n’t be surprised if
that was sa bug, would you mind opening an issue? When you do, can you include a runnable example so its easy for someone else to test/verify.

Sorry for the inconvenience.

Sincerely,

Sarah Bird

···

On 8/12/16 1:20 PM, Reece Heineke
wrote:

      I am getting an error using DatePicker in Bokeh

0.12.[0-1] using Chrome on Windows 8.1. I input a date by
clicking on the DatetimePicker drop down, but there is time
and timezone information appended. The specific issue is that
timezone name in the string. The DatePicker works with Chrome
on Mac OS X.

    value = dateutil.parser.parse(value.split(' (')[0]).date() is

one possible (ugly) solution.

Full stack trace on the error:

          2016-08-12 19:33:50,900 error handling message

Message ‘PATCH-DOC’ (revision 1): ValueError(‘Unknown
string format’,)

            2016-08-12 19:33:50,900  

message header {‘msgtype’: ‘PATCH-DOC’, ‘msgid’:
‘372FC5659B9249D8B6DDA86903FE4060’} content {‘events’:
[{‘attr’: ‘value’, ‘model’: {‘type’: ‘DatePicker’, ‘id’:
‘bd1f4924-019b-40bc-9c66-218394884b3a’}, ‘new’: ‘Mon Aug
01 2016 00:00:00 GMT-0400 (Eastern Daylight Time)’,
‘kind’: ‘ModelChanged’}], ‘references’: }

            Traceback (most recent call

last):

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/server/protocol/server_handler.py”,
line 38, in handle

                work = yield

handler(message, connection)

              File

“/opt/conda/lib/python3.5/site-packages/tornado/gen.py”,
line 1008, in run

value = future.result()
              File

“/opt/conda/lib/python3.5/site-packages/tornado/concurrent.py”,
line 232, in result

raise_exc_info(self._exc_info)

              File "<string>", line

3, in raise_exc_info

              File

“/opt/conda/lib/python3.5/site-packages/tornado/gen.py”,
line 1017, in run

                yielded =

self.gen.send(value)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/server/session.py”,
line 45, in _needs_document_lock_wrapper

                result = yield

yield_for_all_futures(func(self, *args, **kwargs))

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/server/session.py”,
line 217, in _handle_patch

message.apply_to_document(self.document)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/server/protocol/messages/patch_doc.py”,
line 92, in apply_to_document

doc.apply_json_patch(self.content)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/document.py”,
line 955, in apply_json_patch

patched_obj.set_from_json(attr, value,
models=references)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”,
line 735, in set_from_json

                prop.set_from_json(self,

json, models)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”,
line 371, in set_from_json

models)
              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”,
line 323, in set_from_json

                return self.__set__(obj,

json)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”,
line 455, in set

                value =

self.descriptor.prepare_value(obj.class, self.name,
value)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”,
line 274, in prepare_value

                value =

self.transform(value)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/properties.py”,
line 1529, in transform

                value =

dateutil.parser.parse(value).date()

              File

“/opt/conda/lib/python3.5/site-packages/dateutil/parser.py”,
line 1164, in parse

                return

DEFAULTPARSER.parse(timestr, **kwargs)

              File

“/opt/conda/lib/python3.5/site-packages/dateutil/parser.py”,
line 555, in parse

                raise ValueError("Unknown

string format")

            ValueError: Unknown string

format

  You received this message because you are subscribed to the Google

Groups “Bokeh Discussion - Public” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to [email protected].

  To post to this group, send email to [email protected].

  To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/21bd876b-05fe-45d5-abe3-c8b7261303cd%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/21bd876b-05fe-45d5-abe3-c8b7261303cd%40continuum.io?utm_medium=email&utm_source=footer).

  For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).


Sarah Bird
Developer, Bokeh

    [
      ![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
    ](http://continuum.io)

Hi Sarah,

I put a ticket in for this issue: DatePicker errors on input from Chrome on Windows 8.1 · Issue #4965 · bokeh/bokeh · GitHub

Thanks,

Reece

···

On Monday, August 15, 2016 at 5:57:52 PM UTC-4, Sarah Bird wrote:

Hmmm…

I would n’t be surprised if
that was sa bug, would you mind opening an issue? When you do, can you include a runnable example so its easy for someone else to test/verify.

Sorry for the inconvenience.

Sincerely,

Sarah Bird

  On 8/12/16 1:20 PM, Reece Heineke > wrote:
      I am getting an error using DatePicker in Bokeh

0.12.[0-1] using Chrome on Windows 8.1. I input a date by
clicking on the DatetimePicker drop down, but there is time
and timezone information appended. The specific issue is that
timezone name in the string. The DatePicker works with Chrome
on Mac OS X.

Full stack trace on the error:

          2016-08-12 19:33:50,900 error handling message

Message ‘PATCH-DOC’ (revision 1): ValueError(‘Unknown
string format’,)

            2016-08-12 19:33:50,900  

message header {‘msgtype’: ‘PATCH-DOC’, ‘msgid’:
‘372FC5659B9249D8B6DDA86903FE40 60’} content {‘events’:
[{‘attr’: ‘value’, ‘model’: {‘type’: ‘DatePicker’, ‘id’:
‘bd1f4924-019b-40bc-9c66- 218394884b3a’}, ‘new’: ‘Mon Aug
01 2016 00:00:00 GMT-0400 (Eastern Daylight Time)’,
‘kind’: ‘ModelChanged’}], ‘references’: }

            Traceback (most recent call

last):

File
“/opt/conda/lib/python3.5/site-packages/bokeh/server/ protocol/server_handler.py”,
line 38, in handle

                work = yield

handler(message, connection)

              File

“/opt/conda/lib/python3.5/ site-packages/tornado/gen.py”,
line 1008, in run

value = future.result()
              File

“/opt/conda/lib/python3.5/site-packages/tornado/ concurrent.py”,
line 232, in result

raise_exc_info(self._exc_info)

              File "<string>", line

3, in raise_exc_info

              File

“/opt/conda/lib/python3.5/ site-packages/tornado/gen.py”,
line 1017, in run

                yielded =

self.gen.send(value)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/server/ session.py”,
line 45, in _needs_document_lock_wrapper

                result = yield

yield_for_all_futures(func(self, *args, **kwargs))

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/server/ session.py”,
line 217, in _handle_patch

message.apply_to_document(self.document)

File
“/opt/conda/lib/python3.5/site-packages/bokeh/server/protocol/messages/patch_doc. py”,
line 92, in apply_to_document

doc.apply_json_patch(self.content)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/document. py”,
line 955, in apply_json_patch

patched_obj.set_from_json( attr, value,
models=references)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 735, in set_from_json

                prop.set_from_json(self,

json, models)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 371, in set_from_json

models)
              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 323, in set_from_json

                return self.__set__(obj,

json)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 455, in set

                value =

self.descriptor.prepare_value(obj.class, self.name ,
value)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 274, in prepare_value

                value =

self.transform(value)

              File

“/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 1529, in transform

                value =

dateutil.parser.parse(value).date()

              File

“/opt/conda/lib/python3.5/site-packages/dateutil/parser. py”,
line 1164, in parse

                return

DEFAULTPARSER.parse(timestr, **kwargs)

              File

“/opt/conda/lib/python3.5/site-packages/dateutil/parser. py”,
line 555, in parse

                raise ValueError("Unknown

string format")

            ValueError: Unknown string

format

value = dateutil.parser.parse(value. split(’ (')[0]).date() is
one possible (ugly) solution.

  You received this message because you are subscribed to the Google

Groups “Bokeh Discussion - Public” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to [email protected].

  To post to this group, send email to [email protected].

  To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/21bd876b-05fe-45d5-abe3-c8b7261303cd%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/21bd876b-05fe-45d5-abe3-c8b7261303cd%40continuum.io?utm_medium=email&utm_source=footer).

  For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).


Sarah Bird
Developer, Bokeh

    [
      <img alt="Continuum Analytics" src="https://lh6.googleusercontent.com/proxy/VYgVjggTk1hCXSN9wFkffE3I6kxTvJ51tT4KvDXOuKbs1WyFG66k7kt2-vkDimbyxfWtP-d1paJmstMYhPPnDYSUF4rLPoYM2GM2QFM=w5000-h5000" style="width:150px;min-height:30px" height="30px" width="150px">
    ](http://continuum.io)

Thanks

···

On 8/16/16 12:30 PM, Reece Heineke
wrote:

Hi Sarah,

I put a ticket in for this issue:

Thanks,

Reece

      On Monday, August 15, 2016 at 5:57:52 PM UTC-4, Sarah Bird

wrote:

Hmmm…

I would n’t be surprised if that was sa bug, would
you mind opening an issue? When you do, can you include a runnable example so
its easy for
someone else to test/verify.

Sorry for the inconvenience.

Sincerely,

Sarah Bird

On 8/12/16 1:20 PM, Reece Heineke wrote:

                I am getting an error using DatePicker in Bokeh

0.12.[0-1] using Chrome on Windows 8.1. I input a
date by clicking on the DatetimePicker drop down,
but there is time and timezone information appended.
The specific issue is that timezone name in the
string. The DatePicker works with Chrome on Mac OS
X.

Full stack trace on the error:

                    2016-08-12 19:33:50,900 error handling message

Message ‘PATCH-DOC’ (revision 1):
ValueError(‘Unknown string format’,)

                      2016-08-12 19:33:50,900   message header

{‘msgtype’: ‘PATCH-DOC’, ‘msgid’: ‘372FC5659B9249D8B6DDA86903FE40 60’}
content {‘events’: [{‘attr’: ‘value’, ‘model’:
{‘type’: ‘DatePicker’, ‘id’:
‘bd1f4924-019b-40bc-9c66- 218394884b3a’},
‘new’: ‘Mon Aug 01 2016 00:00:00 GMT-0400
(Eastern Daylight Time)’, ‘kind’:
‘ModelChanged’}], ‘references’: }

Traceback (most recent call last):

                        File

“/opt/conda/lib/python3.5/site-packages/bokeh/server/ protocol/server_handler.py”,
line 38, in handle

                          work = yield handler(message,

connection)

File “/opt/conda/lib/python3.5/ site-packages/tornado/gen.py”,
line 1008, in run

value = future.result()

File “/opt/conda/lib/python3.5/site-packages/tornado/ concurrent.py”,
line 232, in result

raise_exc_info(self._exc_info)
                        File "<string>", line 3, in

raise_exc_info

File “/opt/conda/lib/python3.5/ site-packages/tornado/gen.py”,
line 1017, in run

yielded = self.gen.send(value)

File “/opt/conda/lib/python3.5/site-packages/bokeh/server/ session.py”,
line 45, in _needs_document_lock_wrapper

                          result = yield

yield_for_all_futures(func( self, *args,
**kwargs))

File “/opt/conda/lib/python3.5/site-packages/bokeh/server/ session.py”,
line 217, in _handle_patch

message.apply_to_document(self.document)
                        File

“/opt/conda/lib/python3.5/site-packages/bokeh/server/protocol/messages/patch_doc. py”,
line 92, in apply_to_document

doc.apply_json_patch(self.content)

File “/opt/conda/lib/python3.5/site-packages/bokeh/document. py”,
line 955, in apply_json_patch

patched_obj.set_from_json(                          attr,

value, models=references)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 735, in set_from_json

                          prop.set_from_json(self, json,

models)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 371, in set_from_json

models)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 323, in set_from_json

return self.__set__(obj, json)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 455, in set

                          value =

self.descriptor.prepare_value( obj.class,
self.name, value)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 274, in prepare_value

value = self.transform(value)

File “/opt/conda/lib/python3.5/site-packages/bokeh/core/ properties.py”,
line 1529, in transform

value = dateutil.parser.parse(value).date()

File “/opt/conda/lib/python3.5/site-packages/dateutil/parser. py”,
line 1164, in parse

                          return DEFAULTPARSER.parse(timestr,

**kwargs)

File “/opt/conda/lib/python3.5/site-packages/dateutil/parser. py”,
line 555, in parse

                          raise ValueError("Unknown string

format")

ValueError: Unknown string format

value = dateutil.parser.parse(value. split(’
(')[0]).date() is one possible (ugly) solution.

            You received this message because you are subscribed to

the Google Groups “Bokeh Discussion - Public” group.

            To unsubscribe from this group and stop receiving emails

from it, send an email to [email protected].

            To post to this group, send email to [email protected].

            To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/21bd876b-05fe-45d5-abe3-c8b7261303cd%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/21bd876b-05fe-45d5-abe3-c8b7261303cd%40continuum.io?utm_medium=email&utm_source=footer).

            For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).


Sarah Bird
Developer, Bokeh

              [ ![Continuum
                  Analytics](https://lh6.googleusercontent.com/proxy/VYgVjggTk1hCXSN9wFkffE3I6kxTvJ51tT4KvDXOuKbs1WyFG66k7kt2-vkDimbyxfWtP-d1paJmstMYhPPnDYSUF4rLPoYM2GM2QFM=w5000-h5000) ](http://continuum.io)

  You received this message because you are subscribed to the Google

Groups “Bokeh Discussion - Public” group.

  To unsubscribe from this group and stop receiving emails from it,

send an email to [email protected].

  To post to this group, send email to [email protected].

  To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/fcb7cd99-d750-4b3b-ba36-c2504247ee98%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/fcb7cd99-d750-4b3b-ba36-c2504247ee98%40continuum.io?utm_medium=email&utm_source=footer).

  For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).


Sarah Bird
Developer, Bokeh

    [
      ![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
    ](http://continuum.io)

https://github.com/bokeh/bokeh/issues/4965