-
Notifications
You must be signed in to change notification settings - Fork 22
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
DW fails to display DataFrame in dict where key is Enum member #285
Labels
external
Issue belongs to another repository
Comments
Hi @danhje, thank you for reporting the issue! It looks like this one is also a problem with the Jupyter extension's variable delegation. From Jupyter output logs (with logging level set to debug): Working launch:
Failing launch (doesn't show launch message):
|
The same problem can be observed with from enum import Enum, StrEnum
import numpy as np
import pandas as pd
class StringEnum(StrEnum):
A = "foo"
B = "bar"
class NormalEnum(Enum):
A = 1
B = 2
container = {
# error message "Could not retrieve variable container[<StringEnum.A: 'foo'>] from the Jupyter extension. Please file an issue on the Data Wrangler GitHub repository."
StringEnum.A: pd.DataFrame(data=np.arange(4).reshape((2, 2)), columns=["A", "B"]),
# "View Value in Data Wrangler" does not show up in the context menu in debugger
NormalEnum.A: pd.DataFrame(data=np.arange(4).reshape((2, 2)), columns=["A", "B"]),
# OK
"works": pd.DataFrame(data=np.arange(4).reshape((2, 2)), columns=["A", "B"]),
# OK
1: pd.DataFrame(data=np.arange(4).reshape((2, 2)), columns=["A", "B"])
}
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Environment data
Expected behaviour
DataFrame is displayed
Actual behaviour
Nothing happens
Steps to reproduce:
Debug this script with a breakpoint on
pass
:The DF that corresponds to the
"ONE"
key opens without issue, but the DF that corresponds with theMyEnum.ONE
value does not.The text was updated successfully, but these errors were encountered: