Git Product home page Git Product logo

Comments (10)

aschonfeld avatar aschonfeld commented on May 28, 2024

So app_root is something that is meant to be used when serving D-Tale up within jupyerhub. There is a server proxy that opens up all flask routes using a different URL path.

I can try seeing if I can make use of Flask's url_prefix parameter, but honestly your best bet is to do something like using different ports (i think you just need to open both ports in your docker configuration):

import dtale
import pandas as pd
d = dtale.show(pd.DataFrame([1,2,3,4,5]),host='localhost', port="40000")
d._main_url

d1 = dtale.show(pd.DataFrame([1,2,3,4,5]),host='localhost', port="40001")
d1._main_url

Or you can apply names to your data:

import dtale
import pandas as pd
d = dtale.show(pd.DataFrame([1,2,3,4,5]),host='localhost', name="satya")
d._main_url  # http://localhost:40000/dtale/main/satya

d1 = dtale.show(pd.DataFrame([1,2,3,4,5]),host='localhost', name="test", ignore_duplicate=True)
d1._main_url  # http://localhost:40000/dtale/main/test

from dtale.

go-kool avatar go-kool commented on May 28, 2024

Thanks for the suggestion @aschonfeld its really helpfull, I tried giving names to data and its working good. But i getting some Bad request
errors in my jupyter notebook continuously, however I am able to access the Dtale with the urls below.
http://localhost:40000/dtale/main/satya
http://localhost:40000/dtale/main/test

Is there any way we can do this without errors ?
image

from dtale.

aschonfeld avatar aschonfeld commented on May 28, 2024

Are you hitting the D-Tale URLs from https? I've never seen that error and the only thing I can find about it is when someone tries to hit a flask endpoint from https that is only setup for http: https://stackoverflow.com/questions/58902838/python-flask-error-code-400-message-bad-request-version

from dtale.

go-kool avatar go-kool commented on May 28, 2024

@aschonfeld I getting the error as soon as I run the second cell attached in the above screenshot. I am accessing it on http.

from dtale.

aschonfeld avatar aschonfeld commented on May 28, 2024

So I was able to run your code in a jupyter notebook with no issue. Is your notebook running under HTTPS?

from dtale.

go-kool avatar go-kool commented on May 28, 2024

@aschonfeld Yes, Its running inside Kubenertes clusters and exposed using ingress on Https

from dtale.

aschonfeld avatar aschonfeld commented on May 28, 2024

ok then thats the problem. Do you have to use HTTPS?

from dtale.

nandinibalusu978 avatar nandinibalusu978 commented on May 28, 2024

@aschonfeld Yes, We need to run our service on https only

from dtale.

aschonfeld avatar aschonfeld commented on May 28, 2024

So what I plan on doing is exposing the ability to specify an ssl_context when starting up the flask process invoked by dtale.show. This way you can call something like dtale.show(..., ssl_context="adhoc") and it should allow you to use HTTPS.

I'll keep you posted about when this change gets released

from dtale.

aschonfeld avatar aschonfeld commented on May 28, 2024

@go-kool @nandinibalusu978 just released v3.6.0 to pypi (should be on conda-forge soon) with this fix included.

Also, if you haven't already, please put your ⭐ on the repo when you get a sec. Thanks! 🙏

from dtale.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.