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

Run code with example corpus with error #1

Open
svjack opened this issue Jul 9, 2021 · 19 comments
Open

Run code with example corpus with error #1

svjack opened this issue Jul 9, 2021 · 19 comments

Comments

@svjack
Copy link

svjack commented Jul 9, 2021

I try the example corpus server.
and have below error:
截屏2021-07-09 下午7 31 54

@liao961120
Copy link
Owner

A query interface should pop up in your web browser.
Could you provide more context, e.g., the code you used to start the server?

@svjack
Copy link
Author

svjack commented Jul 10, 2021

IMG_1056
i also curl to /query , it has status code 200.
Can you provide me fully curl or request format to test ?

@svjack
Copy link
Author

svjack commented Jul 10, 2021

Where is your entry to retrieve “title” or the render source ?

@svjack
Copy link
Author

svjack commented Jul 10, 2021

i run your project in macos and i think this may be a front end problem

@liao961120
Copy link
Owner

liao961120 commented Jul 10, 2021

I publish the front-end query interface at https://concordancer.netlify.app.

So after you run:

server.run(C)

you can visit https://concordancer.netlify.app to query the corpus.

Also, if you are interested in sending requests by yourself, you can take a look at the source code in server.py. The tedious part is escaping various special characters in CQL.

@svjack
Copy link
Author

svjack commented Jul 10, 2021

I publish the front-end query interface at https://concordancer.netlify.app.

So after you run:

server.run(C)

you can visit https://concordancer.netlify.app to query the corpus.

Also, if you are interested in sending requests by yourself, you can take a look at the source code in server.py. The tedious part is escaping various special characters in CQL.

Where is the entry of https://concordancer.netlify.app/ in the server.py?
Or how can i init without 404 in local ?

@svjack
Copy link
Author

svjack commented Jul 10, 2021

IMG_1057
in your web site https://concordancer.netlify.app/

@liao961120
Copy link
Owner

Strange...
It does work on my computer
image

@svjack
Copy link
Author

svjack commented Jul 10, 2021

Strange...
It does work on my computer
image

I now run the code locally. And have try to install your package in a clean ubuntu.
Also can not render in the browser.
Should i install vue? if i should , can you give me a guide of install it ?

@liao961120
Copy link
Owner

No, vue is not required. Did the browser show up invalid cql syntax? If it does, it means the server is responding, so it might be backend problems.

@svjack
Copy link
Author

svjack commented Jul 10, 2021

No, vue is not required. Did the browser show up invalid cql syntax? If it does, it means the server is responding, so it might be backend problems.

Nope,
in ubuntu it is also 404 as macos

@liao961120
Copy link
Owner

You can test the URL below directly (with the browser or curl) after starting the server and see if any JSON is returned.
http://localhost:1420/query?query=%22%E6%88%91%22&left=10&right=10

@svjack
Copy link
Author

svjack commented Jul 10, 2021

You can test the URL below directly (with the browser or curl) after starting the server and see if any JSON is returned.
http://localhost:1420/query?query=%22%E6%88%91%22&left=10&right=10

This have response, but request to http://localhost:1420 directly, don't have response (404)

@liao961120
Copy link
Owner

That's working as expected, since the server does not listen on /. Only GET requests sent to /query and /export will respond.

It seems that the failure is coming from the browser. What browser do you use? Chrome works fine on my computer.

@svjack
Copy link
Author

svjack commented Jul 10, 2021

That's working as expected, since the server does not listen on /. Only GET requests sent to /query and /export will respond.

It seems that the failure is coming from the browser. What browser do you use? Chrome works fine on my computer.

macos i use safari
ubuntu i use firefox

@svjack
Copy link
Author

svjack commented Jul 10, 2021

I macos i use chorme have pollowing result:
截屏2021-07-11 上午2 18 07

@liao961120
Copy link
Owner

liao961120 commented Jul 11, 2021

It seems fine. http://localhost:1420/ is not expected to response.

IMG_1057
in your web site https://concordancer.netlify.app/

The figure above means that your browser is working fine (since INVALID CQL SYNTAX is a response from the server). Basically, the font-end just sends ajax GET request to http://localhost:1420/query:

image

@svjack
Copy link
Author

svjack commented Jul 12, 2021

It seems fine. http://localhost:1420/ is not expected to response.

IMG_1057
in your web site https://concordancer.netlify.app/

The figure above means that your browser is working fine (since INVALID CQL SYNTAX is a response from the server). Basically, the font-end just sends ajax GET request to http://localhost:1420/query:

image

I find the my import code yield warning about :
pythonlogging.warning("Skip download query interface")
Dose this related with the error above ?

@liao961120
Copy link
Owner

Nope, as long as you use the query interface at https://concordancer.netlify.app/, you can ignore the warning.

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

2 participants