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

jsonschema 4.18.1 breaks chart rendering #3104

Closed
sean-doody opened this issue Jul 12, 2023 · 1 comment
Closed

jsonschema 4.18.1 breaks chart rendering #3104

sean-doody opened this issue Jul 12, 2023 · 1 comment
Labels

Comments

@sean-doody
Copy link

Hey there!

I'm new to Altair and I was continuously running into this bug when trying to render Altair charts (v. 5.0.1) in JupyterLab or VSCode:

_RefResolutionError: 'bytes' object has no attribute 'timeout'

I was using this example code:

import altair as alt
from vega_datasets import data

source = data.stocks()

lines = (
    alt.Chart(source)
    .mark_line()
    .encode(x="date", y="price", color="symbol")
)

xrule = (
    alt.Chart()
    .mark_rule(color="cyan", strokeWidth=2)
    .encode(x=alt.datum(alt.DateTime(year=2006, month="November")))
)

yrule = (
    alt.Chart().mark_rule(strokeDash=[12, 6], size=2).encode(y=alt.datum(350))
)


lines + yrule + xrule

Turns out it was a jsonschema issue. Downgrading to jsonschema==4.18.0 resolved the problem. All is working now: great library!

@sean-doody sean-doody added the bug label Jul 12, 2023
@binste
Copy link
Contributor

binste commented Jul 12, 2023

Thank you for reporting this and figuring out that it was the new jsonschema release that caused the issue. This was a regression on the jsonschema side which they just now fixed in a new version 4.18.2. See python-jsonschema/jsonschema#1124 for reference. So upgrading to 4.18.2 should solve it as well 🙂

@binste binste closed this as completed Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants