dldl / sphinx-preview

Sphinx preview in Atom
MIT License
5 stars 4 forks source link

404 No such container #7

Closed mia1024 closed 5 years ago

mia1024 commented 7 years ago

When I tried to toggle the preview, it gave me this feedback: (HTTP code 404) no such container - No such image: dldl/sphinx-server:latest

mia1024 commented 7 years ago

I apologize for not reading the README more carefully. Now I believe I installed the docker server properly, but when I tried to connect to 127.0.0.1:8000/Untitled.html, the web page gave the following response:

Error response

Error code 404.

Message: File not found.

Error code explanation: 404 = Nothing matches the given URI.
quentinus95 commented 7 years ago

Hello,

Can you give me the list of the files for your project (especially a screenshot of the files tree view)?

What is your OS?

Thx

mia1024 commented 7 years ago

screen shot 2017-05-26 at 7 17 44 am macOS 10.12.3

quentinus95 commented 7 years ago

You may have several issues here.

First, run docker stop sphinx-preview in a terminal to stop the sphinx-server instance (you can run docker ps to see the full containers list).

Then, create a .sphinx-server.yml file at the root of your documentation with the line

autobuild: true

It is actually an issue, I will check out to fix it soon.

Save, restart your atom instance and open the sphinx-preview panel again.

Now autorefresh should be running.

If you still have a 404 issue, you may have syntax issues in your file.

You can run in a terminal docker logs sphinx-preview (or docker logs -f sphinx-preview to keep the logs opened) to see if compilation is failing somewhere (and if saving your file correctly triggers the build).

quentinus95 commented 7 years ago

I have created the issue #9 (the sphinx server yaml file should be automatically created by sphinx preview).

mia1024 commented 7 years ago

I am pretty sure I don't have syntax issue because when I run make html directly on the folder everything is fine.

quentinus95 commented 7 years ago

Ok, can you add the missing sphinx server config file and check out the logs to be sure that it is not sphinx-server related?

mia1024 commented 7 years ago

So, after did what you said, it is still not working. Here is the Error Message I got from terminal


Error: Config directory doesn't contain a conf.py file.
172.17.0.1 - - [26/May/2017 02:29:16] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:16] "GET /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:29:16] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:16] "GET /favicon.ico HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:29:27] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:27] "HEAD /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:29:33] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:33] "GET /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:29:34] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:34] "GET /favicon.ico HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:29:44] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:44] "GET /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:29:45] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:45] "GET /favicon.ico HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:29:45] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:45] "GET /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:29:45] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:29:45] "GET /favicon.ico HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:31:29] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:31:29] "GET /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:31:29] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:31:29] "GET /favicon.ico HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:31:55] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:31:55] "GET /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:31:55] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:31:55] "GET /favicon.ico HTTP/1.1" 404 -

Error: Config directory doesn't contain a conf.py file.
172.17.0.1 - - [26/May/2017 02:39:19] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:39:19] "GET /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:42:02] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:42:02] "HEAD /Untitled.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:46:08] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:46:08] "GET /Sphinx%20Test/index.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:46:08] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:46:08] "GET /favicon.ico HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:46:14] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:46:14] "GET /Sphinx%20Test/index.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:46:14] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:46:14] "GET /favicon.ico HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:46:15] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:46:15] "GET /Sphinx%20Test/index.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 02:46:15] code 404, message File not found
172.17.0.1 - - [26/May/2017 02:46:15] "GET /favicon.ico HTTP/1.1" 404 -

Error: Config directory doesn't contain a conf.py file.
172.17.0.1 - - [26/May/2017 11:17:12] code 404, message File not found
172.17.0.1 - - [26/May/2017 11:17:12] "GET /index.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 11:17:12] code 404, message File not found
172.17.0.1 - - [26/May/2017 11:17:12] "GET /favicon.ico HTTP/1.1" 404 -

Error: Config directory doesn't contain a conf.py file.
172.17.0.1 - - [26/May/2017 14:59:23] code 404, message File not found
172.17.0.1 - - [26/May/2017 14:59:23] "GET /index.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 14:59:29] code 404, message File not found
172.17.0.1 - - [26/May/2017 14:59:29] "GET /index.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 14:59:29] code 404, message File not found
172.17.0.1 - - [26/May/2017 14:59:29] "GET /favicon.ico HTTP/1.1" 404 -

Error: Config directory doesn't contain a conf.py file.
172.17.0.1 - - [26/May/2017 15:00:50] code 404, message File not found
172.17.0.1 - - [26/May/2017 15:00:50] "GET /index.html HTTP/1.1" 404 -
172.17.0.1 - - [26/May/2017 15:00:50] code 404, message File not found
172.17.0.1 - - [26/May/2017 15:00:50] "GET /favicon.ico HTTP/1.1" 404 -

Which doesn't make much sense to me because there is indeed a conf.py file. screen shot 2017-05-26 at 11 04 23 am

mia1024 commented 7 years ago

Sphinx Test.zip Here is my root folder, if this will be helpful

quentinus95 commented 7 years ago

Thanks, everything seems to be OK. However, the config.py and the .sphinx-server.yml files are not detected.

This could happen because the container is not properly mounted on your project folder.

If you still have the error page, can you paste the output of the following command:

docker inspect sphinx-preview | grep Source
mia1024 commented 7 years ago

Everything's fine now after deleting and recreating the container. Can you please tell me how to rebuild the contents of preview after updating my files? Thank you.

quentinus95 commented 7 years ago

Hello,

There is a known cache issue as stated in #2. It is actually a bit hard to find out which part (Sphinx-Server, Sphinx-Preview or browser plus) is responsible for the issue.

Does the page refresh when you explicitly save the file?

If you open the page on an external browser, do you see the changes?

bfontana commented 7 years ago

Followed these steps but still getting 404. Atom on macOS Sierra.

Project is on /Users/bfontana/doc-gde docker inspect | grep Source you suggest running states: "Source": "/Users/bfontana/Documents/speedtest-python-openwrt"

Would different source be the problem?

quentinus95 commented 7 years ago

@bfontana Be sure to open the project in a standalone Atom instance (you must have only one project opened in the current instance) or your files may not be retreived by the extension. You can achieve this by running atom ./ in your documentation folder or using File > Open Folder... and choose your documentation root directory.

Xavier-i commented 6 years ago

Had exact same issue as @bfontana, and I am sure I have followed all the instructions

quentinus95 commented 6 years ago

Sadly I don't have a computer running macOS so it's quite hard to find where the issue is. Have you tried what I wrote in my previous message?

Xavier-i commented 6 years ago

Yes, I did followed all the cells. But my log messeage is slightly different.

[I 180226 15:09:34 server:283] Serving on http://0.0.0.0:8000 [I 180226 15:09:34 handlers:60] Start watching changes [I 180226 15:09:34 handlers:62] Start detecting changes [W 180226 15:09:36 web:2063] 404 GET /source/index.html (172.17.0.1) 2.55ms [W 180226 15:09:36 web:2063] 404 GET /favicon.ico (172.17.0.1) 2.51ms [W 180226 15:09:37 web:2063] 404 GET /source/index.html (172.17.0.1) 1.60ms [W 180226 15:09:38 web:2063] 404 GET /favicon.ico (172.17.0.1) 1.87ms [W 180226 15:50:41 web:2063] 404 GET /source/index.html (172.17.0.1) 1.80ms [W 180226 15:50:41 web:2063] 404 GET /favicon.ico (172.17.0.1) 1.73ms [W 180226 15:50:49 web:2063] 404 GET /source/index.html (172.17.0.1) 1.59ms [W 180226 15:50:49 web:2063] 404 GET /favicon.ico (172.17.0.1) 1.55ms [W 180226 15:51:02 web:2063] 404 GET /source/index.html (172.17.0.1) 1.74ms [W 180226 15:51:02 web:2063] 404 GET /favicon.ico (172.17.0.1) 1.53ms [W 180226 15:51:03 web:2063] 404 GET /source/index.html (172.17.0.1) 1.54ms [W 180226 15:51:03 web:2063] 404 GET /favicon.ico (172.17.0.1) 2.03ms [W 180226 15:51:05 web:2063] 404 GET /source/index.html (172.17.0.1) 1.36ms [W 180226 15:51:05 web:2063] 404 GET /favicon.ico (172.17.0.1) 1.71ms

quentinus95 commented 5 years ago

Caching and multi-project issues have been fixed in 0.1.3 & 0.1.4 + the latest image for sphinx-server.