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

"TypeError: data type 'Float64' not understood" Error in Export #54

Open
syncrotron opened this issue Apr 29, 2022 · 1 comment
Open

Comments

@syncrotron
Copy link

I encountered an error when exporting "Export data" button in the UI, where the export would fail with the error:

(bulkvis) shorovatin@TARAS:~/assets$ bulkvis serve /home/shorovatin/assets/data --show
2022-04-29 11:44:13,365 Starting Bokeh server version 2.1.1 (running on Tornado 6.0.4)
2022-04-29 11:44:13,366 User authentication hooks NOT provided (default user enabled)
2022-04-29 11:44:13,367 Bokeh app running at: http://localhost:5006/bulkvis_server
2022-04-29 11:44:13,367 Starting Bokeh server with process id: 276595
2022-04-29 11:44:13,604 Using dir: /home/shorovatin/assets/data
2022-04-29 11:44:13,709 404 GET /favicon.ico (127.0.0.1) 0.36ms
2022-04-29 11:44:13,784 WebSocket connection opened
2022-04-29 11:44:13,784 ServerConnection created
2022-04-29 11:44:26,522 Exporting to /home/shorovatin/assets/data/WIMMER_20220224_1124_FAR92883_MN23001_sequencing_run_HMW1_2210210f_bulkvis-read_0-36000000_ch_390.fast5
2022-04-29 11:44:26,524 error handling message
 message: Message 'PATCH-DOC' content: {'events': [{'kind': 'MessageSent', 'msg_type': 'bokeh_event', 'msg_data': {'event_name': 'button_click', 'event_values': {}}}], 'references': []} 
 error: TypeError("data type 'Float64' not understood")
Traceback (most recent call last):
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/server/protocol_handler.py", line 90, in handle
    work = await handler(message, connection)
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/server/session.py", line 67, in _needs_document_lock_wrapper
    result = func(self, *args, **kwargs)
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/server/session.py", line 261, in _handle_patch
    message.apply_to_document(self.document, self)
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/protocol/messages/patch_doc.py", line 100, in apply_to_document
    doc._with_self_as_curdoc(lambda: doc.apply_json_patch(self.content, setter))
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/document/document.py", line 1150, in _with_self_as_curdoc
    return f()
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/protocol/messages/patch_doc.py", line 100, in <lambda>
    doc._with_self_as_curdoc(lambda: doc.apply_json_patch(self.content, setter))
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/document/document.py", line 398, in apply_json_patch
    self._trigger_on_message(event_json["msg_type"], event_json["msg_data"])
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/document/document.py", line 687, in _trigger_on_message
    cb(msg_data)
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/document/document.py", line 354, in apply_json_event
    model._trigger_event(event)
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/util/callback_manager.py", line 85, in _trigger_event
    self._document._with_self_as_curdoc(invoke)
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/document/document.py", line 1150, in _with_self_as_curdoc
    return f()
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bokeh/util/callback_manager.py", line 72, in invoke
    callback()
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bulkvis/bulkvis_server/main.py", line 1084, in export_data
    cfg_dr["out"],
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/bulkvis/bulkvis_server/main.py", line 82, in export_read_file
    dtype="Float64",
  File "/home/shorovatin/miniconda3/envs/bulkvis/lib/python3.7/site-packages/h5py/_hl/attrs.py", line 149, in create
    dtype = numpy.dtype(dtype) # In case a string, e.g. 'i8' is passed
TypeError: data type 'Float64' not understood

This appears to be an incompatibility with h5py's named type Float64 and numpy's float64 type. Upon editing all instances of Float64 -> float64 within /bulkvis_server/main.py, the error resolves, with bulkvis being able to export the selected region to a fast5 as expected.

I am creating this issue to document a potential solution to the above error. Any feedback would be appreciated.

I am running on Ubuntu 20.04, using a conda environment outlined in provided yaml in the 2.0 branch.

@KiranQureshi53
Copy link

Hey, are you still looking for it resolution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants