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

dtale.show() error without data #835

Closed
wonb168 opened this issue Jan 4, 2024 · 4 comments
Closed

dtale.show() error without data #835

wonb168 opened this issue Jan 4, 2024 · 4 comments

Comments

@wonb168
Copy link

wonb168 commented Jan 4, 2024

import dtale
dtale.show(open_browser=True)

then got an error in browser:

Traceback (most recent call last):
File "/Users/mac/Library/Python/3.9/lib/python/site-packages/dtale/views.py", line 119, in _handle_exceptions
return func(*args, **kwargs)
File "/Users/mac/Library/Python/3.9/lib/python/site-packages/dtale/views.py", line 2875, in get_data
curr_dtypes = [c["name"] for c in global_state.get_dtypes(data_id)]
TypeError: 'NoneType' object is not iterable

why? thanks

@FedererKK
Copy link

You have not added any data to the dtale instance, and you can not do that. It is expected behavior

import dtale
import pandas as pd

df = pd.DataFrame([dict(a=1,b=2,c=3)])

# Assigning a reference to a running D-Tale process.
d = dtale.show(df)

@aschonfeld
Copy link
Collaborator

So @FedererKK it actually can be started without loading any data. If you do that it should prompt you with a popup to upload some data using the UI (as shown here)

@wonb168 I will look into this and get back to you

@FedererKK
Copy link

So @FedererKK it actually can be started without loading any data. If you do that it should prompt you with a popup to upload some data using the UI (as shown here)

@wonb168 I will look into this and get back to you

Very interesting and simple UX, I must have missed that :-)

@aschonfeld
Copy link
Collaborator

aschonfeld commented Jan 5, 2024

@wonb168 just released v3.9.0 to pypi (will be on conda-forge shortly) with this fix

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

3 participants