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

Type Error: replay_lock argument #645

Closed
ethanalvizo opened this issue Jul 19, 2024 · 1 comment · Fixed by #749
Closed

Type Error: replay_lock argument #645

ethanalvizo opened this issue Jul 19, 2024 · 1 comment · Fixed by #749
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ethanalvizo
Copy link
Contributor

Description
Tried the following example when testing some docs changes. Encountered the bug shown in the screenshot. I think it has something to do with replay_lock being passed in use_table_listener.py

Steps to reproduce

  1. Enter the example code from docs:
    https://github.com/deephaven/deephaven-plugins/blob/main/plugins/ui/docs/README.md#using-table-data-hooks
from deephaven import ui
from deephaven.table import Table
from deephaven import time_table, agg
import deephaven.plot.express as dx

stocks = dx.data.stocks()


@ui.component
def watch_lizards(source: Table):

    sold_lizards = source.where(["side in `sell`", "sym in `LIZARD`"])
    exchange_count_table = sold_lizards.view(["exchange"]).count_by(
        "count", by=["exchange"]
    )
    last_sell_table = sold_lizards.tail(1)
    max_size_and_price_table = sold_lizards.agg_by([agg.max_(cols=["size", "price"])])
    last_ten_sizes_table = sold_lizards.view("size").tail(10)
    average_sell_table = (
        sold_lizards.view(["size", "dollars"])
        .tail(100)
        .sum_by()
        .view("average = dollars/size")
    )

    exchange_count = ui.use_table_data(exchange_count_table)
    last_sell = ui.use_row_data(last_sell_table)
    max_size_and_price = ui.use_row_list(max_size_and_price_table)
    last_ten_sizes = ui.use_column_data(last_ten_sizes_table)
    average_sell = ui.use_cell_data(average_sell_table)

    exchange_count_view = ui.view(f"Exchange counts {exchange_count}")
    last_sell_view = ui.view(f"Last Sold LIZARD: {last_sell}")
    max_size_and_price_view = ui.view(f"Max size and max price: {max_size_and_price}")
    last_ten_sizes_view = ui.view(f"Last Ten Sizes: {last_ten_sizes}")
    average_sell_view = ui.view(f"Average LIZARD price: {average_sell}")

    return ui.flex(
        exchange_count_view,
        last_sell_view,
        max_size_and_price_view,
        last_ten_sizes_view,
        average_sell_view,
        margin=10,
        gap=10,
        direction="column",
    )


watch = watch_lizards(stocks)

Actual results
image

Additional details and attachments

Versions

Engine Version: 0.36.0-SNAPSHOT
Web UI Version: 0.86.0
Java Version: 21.0.3
Barrage Version: 0.6.0
Browser Name: Chrome 124
OS Name: macOS 10.15.7
@deephaven/js-plugin-ui: 0.18.0
@deephaven/js-plugin-plotly-express: 0.11.0
@deephaven/js-plugin-matplotlib: 0.4.1

@ethanalvizo ethanalvizo added bug Something isn't working triage labels Jul 19, 2024
@vbabich vbabich removed the triage label Jul 24, 2024
@vbabich vbabich added this to the July 2024 milestone Jul 24, 2024
@mattrunyon
Copy link
Collaborator

Fixed by #749

@mattrunyon mattrunyon linked a pull request Aug 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants