Coder Social home page Coder Social logo

Static assets URL parser wrong about panel HOT 9 CLOSED

skaller avatar skaller commented on May 23, 2024
Static assets URL parser wrong

from panel.

Comments (9)

philippjfr avatar philippjfr commented on May 23, 2024

Cannot reproduce this, I just ran panel serve app.py --static-dirs assets=doc and then placed an index.html at doc/_static/index.html, which loaded just fine:

Screenshot 2024-01-18 at 09 50 36

from panel.

skaller avatar skaller commented on May 23, 2024

interesting .. let me see if I can get some screenshots from my client (and a version number .. how do you get that?)

from panel.

skaller avatar skaller commented on May 23, 2024

ok we have Panel serve 1.2.3 .. installed using Conda ..

from panel.

skaller avatar skaller commented on May 23, 2024

We managed to get 1.3.6 .. still same issue ..

from panel.

philippjfr avatar philippjfr commented on May 23, 2024

As I said, I cannot reproduce. You'll have to provide more detail, such as operating system and also investigate the permissions structure for the files. Can you reproduce with a different directory that you newly created? Internally we simply use the Tornado StaticFileHandler so it's very unlikely Panel itself is at fault here.

from panel.

skaller avatar skaller commented on May 23, 2024

AH! You aren't doing the same test, that's why you're not reproducing it perhaps. You're putting the URL in the browser search line. That works for us too. What fails is if the URL is in an <a href="...">...</a> tag and you click on it.

In our case that tag is generated by Quarto blog generator, and the click works just fine if we start with the browser pointing at the top level of the blog (i.e. the index page) as a file. But if we point the browser at a the http connection running Panel, we can go into assets/index.html just fine, but clicking on the linking in that page fails.

I'll send more data shortly. We spent all night here trying to get conda-forge to install the latest version. The base conda package is 1.2.3 which is way out of date.

from panel.

skaller avatar skaller commented on May 23, 2024

Just to be clear, the top level entry into assets works fine but a link in that file to an indiex.html in a subdirectory fails with a 403 and the web server reports, on the command line, that the directory is not a file .. leaving out the index.html. The browser search line also shows the wrong link, i.e. without the index.html at the end. I don't understand this because the construction of the link is done by the browser but BOTH safari and chrome fail the same way.

from panel.

skaller avatar skaller commented on May 23, 2024

It could be our CDM system. We have only tried with the live online service, we haven't tried with localhost. I'll get my client to test that, Thanks for holding!

from panel.

skaller avatar skaller commented on May 23, 2024

I have made a simple test case, and it works just fine. But it fails with the quarto generated html. On the other hand the quarto html works fine if its index is the entry. None of this makes any sense to me, since the browser should just be adding a prefix to the anchor href, and the quarto anchor's href is, in my opinion, correct.

In any case I apologise for raising this issue, and thank you for your help, and am now closing it.

from panel.

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.