Orange-OpenSource / conllueditor

ConllEditor is a tool to edit dependency syntax trees in CoNLL-U format.
BSD 3-Clause "New" or "Revised" License
54 stars 17 forks source link

Browser says 404 Not Found #32

Closed jerekupari closed 1 year ago

jerekupari commented 1 year ago

I'm trying to install on Windows 10. My java is the Microsoft Build of OpenJDK 11.

  1. I downloaded the conllueditor-2.22.2.zip, unzipped it and pasted the command line to Powershell (tried also cmd.com), changing the conllu file to a file saved in some version of ConlluEditor.
  2. I get a Microsoft Defender Firewall alert, which I allow (I also tried disabling the firewall, no change).
  3. Something is clearly working, I get a correct number of sentences etc.
  4. When I open my Firefox, I get FileHandler requests like these, so something is working. And if I refresh the page I get two requests more.
  5. But the browser shows only 404 Not Found (which is different from an address not in use, so again something is happening behind the curtains). I also tried Chrome, with similar results.
PS C:\Users\jere\Downloads> java -jar conllueditor-2.22.2\target\ConlluEditor-2.22.2-jar-with-dependencies.jar --rootdir  conllueditor-2.22.2 GS_conllu_22052023.conllu.2 8888
ConlluEditor V 2.22.2 (commit 0834db5, this branch contains uncommited modifications!)
any
+++ edited file 'GS_conllu_22052023.conllu.2' not in git controlled directory, writing all changes to 'GS_conllu_22052023.conllu.2.2'
Loading C:\Users\jere\Downloads\GS_conllu_22052023.conllu.2
1252 lines (22 sentences) read
Number of sentences loaded: 22

ConlluEditor HTTP Server started at http://frakkis:8888/
2023/06/01 01:25:43 GET FileHandler request from 127.0.0.1
2023/06/01 01:25:43 GET FileHandler request from 127.0.0.1
2023/06/01 01:25:50 GET FileHandler request from 127.0.0.1
2023/06/01 01:25:50 GET FileHandler request from 127.0.0.1
2023/06/01 01:25:51 GET FileHandler request from 127.0.0.1
2023/06/01 01:25:51 GET FileHandler request from 127.0.0.1

If I understand correctly it should install the dependencies automatically, at least I see something like that in the gui/libs/ directory.

Should I try WSL or some other bash?

In linux I got it working, but my wife would prefer working in Windows.

jheinecke commented 1 year ago

Hi, at a first look all looks well. Could you try another port (8080 or even 80 if there is no other http server running on your machine). You can also try firebug (F12 on firefox) and check the console and/or network tab whether an error show up somewhere. Since on the server side, the responses seem to be sensible my first guess is a problem somewhere on the browser side

jerekupari commented 1 year ago

Thanks for looking into this!

Changing the port makes no difference (80, 8080, 8457).


I realised I don't have python in path. I updated to 3.11.3, and added it to path. No change.

On another machine I use anaconda, there I tried this in Anaconda Powershell Prompt. No difference.

Where am I supposed to put the script: python3 or py addition?


Both machines have Windows 10 Home. I have a Windows 11 Home machine somewhere, I can try that.


In firebug I don't get any error that would take me forward:

ConlluEditor_debugging

I see that it's trying to load img/404.svg, which it doesn't find. I looked at it in Inkscape and it was nice!

Here's the html it shows:

<html>
<head>
<title >404 Not Found</title>
</head>
<body>
  <img alt="404 Not Found" width="100%" src="img/404.svg">
</body>
</html>
jheinecke commented 1 year ago

I t looks as if the server does not find the gui directory (where all html/js/css is to be found). How did you start it? Try to run the server in the following way:

java -Xmx4g -cp C:\\path\to\ConlluEditor-2.22.2-jar-with-dependencies.jar com.orange.labs.editor.ConlluEditor --rootdir C:\\path\to\gui  conllufile.conllu 8888

and use absolute pathnames for the paths to the jar file and to gui Normally the server should find the gui directory from its own position (at least on Linux), but maybe I overlooked something on Windows

jerekupari commented 1 year ago

Thank you!

Now it works!

jheinecke commented 1 year ago

Good to hear! so it was the path thing?

jerekupari commented 1 year ago

It was something in your last command line with the absolute paths.

jerekupari commented 1 year ago

Also this one works (or at least it starts, don't know about all functionality).

It's the same as in instructions, but --rootfile points to the gui directory.

PS C:\Users\jere\Downloads> java -jar conllueditor-2.22.2\target\ConlluEditor-2.22.2-jar-with-dependencies.jar --rootdir  conllueditor-2.22.2\gui\ GS_conllu_22052023.conllu.2 8888
jerekupari commented 1 year ago

Wait what. That is the same as in instructions, did I just have a copypaste error the whole time?

Sorry!