Binary Transport Data Update Error
@ajduberstein is already working on this.
Since Jul 9, 2021.
Assessment
This issue has not been assessed yet.
Description
I am running into an error in PyDeck when I try to update a layer's data when using binary_transport equal to True.
This error can be reproduced in the 07 - Binary Transport notebook run in the PyDeck Mybinder. Adding the following code at the bottom of the notebook (to update the data)
nodes_layer.data = nodes.iloc[:1000]
gives the following error
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-7-c8e5849254b8> in <module>
----> 1 nodes_layer.data = nodes.iloc[:1000]
2 r.update()
/usr/local/lib/python3.7/site-packages/pydeck/bindings/layer.py in data(self, data_set)
125 """
126 if self.use_binary_transport:
--> 127 self._binary_data = self._prepare_binary_data(data_set)
128 elif is_pandas_df(data_set):
129 self._data = data_set.to_dict(orient="records")
/usr/local/lib/python3.7/site-packages/pydeck/bindings/layer.py in _prepare_binary_data(self, data_set)
153 np_data = np.stack(data_set[column].to_numpy())
154 # Get rid of the accssor so it doesn't appear in the JSON output
--> 155 del self.__dict__[inverted_accessor_map[column]]
156 binary_transmission.append(
157 {
KeyError: 'get_position'
This error happens before running an update - r.update(). This error does not occur when binary_transport is set to False.
Originally posted by @cornhundred in https://github.com/visgl/deck.gl/discussions/5961#discussioncomment-986695
- Dominant language
- TypeScript
- Stars
- 14.6k
- Forks
- 2.3k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 42
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from visgl/deck.gl
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·