Giter Site home page Giter Site logo

404 error while running as server about lit HOT 9 OPEN

pair-code avatar pair-code commented on August 22, 2024
404 error while running as server

from lit.

Comments (9)

wmmxk avatar wmmxk commented on August 22, 2024 3

The error I run yesterday might be similar to yours. I created a python environment from scratch and it worked. BTW, did you run yarn && yarn build successfully?

from lit.

iftenney avatar iftenney commented on August 22, 2024

@kumarvrsec did the above (building the client) resolve this?
Yarn needs to run to compile the typescript and produce the main.js file; we've set it to also copy the other static assets into the build directory.

from lit.

dsvrsec avatar dsvrsec commented on August 22, 2024

yeah ,I am able to resolve that issue,but I am facing another issue frequently.
image

from lit.

iftenney avatar iftenney commented on August 22, 2024

That's odd - possible that you're running from an environment that can't access the hosted files for HuggingFace Transformers?

If so, you can manually download from https://huggingface.co/bert-base-uncased#list-files and pass a pass to that directory instead of the model name.

from lit.

SubtleTom avatar SubtleTom commented on August 22, 2024

@iftenney i have met the same problem as this issue, and the teriminal shows :

I0429 10:50:03.855530 11980 lm_demo.py:123] Dataset: 'sst_dev' with 872 examples
I0429 10:50:03.855530 11980 lm_demo.py:123] Dataset: 'sst_dev' with 872 examples
I0429 10:50:03.856530 11980 lm_demo.py:123] Dataset: 'imdb_train' with 1000 examples
I0429 10:50:03.856530 11980 lm_demo.py:123] Dataset: 'imdb_train' with 1000 examples
I0429 10:50:03.856530 11980 lm_demo.py:123] Dataset: 'blank' with 0 examples
I0429 10:50:03.856530 11980 lm_demo.py:123] Dataset: 'blank' with 0 examples
I0429 10:50:03.857529 11980 dev_server.py:88]
( (
)\ ) )\ ) * )
(()/((()/(` ) /(
/())/())( )())
()) ()) ((())
| | | || _|

I0429 10:50:03.881873 11980 wsgi_serving.py:43]

Starting Server on port 5432
You can navigate to 127.0.0.1:5432

I0429 10:50:03.886013 11980 _internal.py:224] * Running on http://127.0.0.1:5432/ (Press CTRL+C to quit)
I0429 10:50:03.886013 11980 _internal.py:224] * Running on http://127.0.0.1:5432/ (Press CTRL+C to quit)
W0429 10:51:14.825967 11980 wsgi_app.py:55] IOError [Errno 2] No such file or directory: 'D:\lit-main\lit_nlp\client\build\default\static/index.html' on path D:\lit-main\lit_nlp\client\build\default\static/index.html
W0429 10:51:14.825967 11980 wsgi_app.py:55] IOError [Errno 2] No such file or directory: 'D:\lit-main\lit_nlp\client\build\default\static/index.html' on path D:\lit-main\lit_nlp\client\build\default\static/index.html
I0429 10:51:14.827513 11980 wsgi_app.py:145] path D:\lit-main\lit_nlp\client\build\default\static/index.html not found, sending 404
I0429 10:51:14.827513 11980 wsgi_app.py:145] path D:\lit-main\lit_nlp\client\build\default\static/index.html not found, sending 404
I0429 10:51:14.827513 11980 _internal.py:224] 127.0.0.1 - - [29/Apr/2022 10:51:14] "GET / HTTP/1.1" 404 -
I0429 10:51:14.827513 11980 _internal.py:224] 127.0.0.1 - - [29/Apr/2022 10:51:14] "GET / HTTP/1.1" 404 -

but the file"index.html" has already been in the path, also i can not open this file with google chrome.
So, please help me to solve the problem, thanks!
i have checked my environment with the yml file and create a python conda envo, but it still can not work.
my systemt is windows11, pycharm, google chrome.

from lit.

iftenney avatar iftenney commented on August 22, 2024

Did you run yarn && yarn build?

from lit.

SubtleTom avatar SubtleTom commented on August 22, 2024

Did you run yarn && yarn build?

yes, i have used yarn(on window system) to test my version. and it still can not work.

from lit.

iftenney avatar iftenney commented on August 22, 2024

Hard to tell without seeing what's in the path, you mentioned pycharm - I'm not sure if that might interact with the paths?
This is the code that fetches the static files - you could try debugging from here: https://github.com/PAIR-code/lit/blob/main/lit_nlp/lib/wsgi_app.py#L37

(Unfortunately, we don't have official Windows support for this project, if you're not able to resolve with your regular Windows enviroment you might try running under WSL?)

from lit.

SubtleTom avatar SubtleTom commented on August 22, 2024

Hard to tell without seeing what's in the path, you mentioned pycharm - I'm not sure if that might interact with the paths? This is the code that fetches the static files - you could try debugging from here: https://github.com/PAIR-code/lit/blob/main/lit_nlp/lib/wsgi_app.py#L37

(Unfortunately, we don't have official Windows support for this project, if you're not able to resolve with your regular Windows enviroment you might try running under WSL?)

ok,i will try to test my path, or i may need to use WSL. thanks!

from lit.

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.