Giter Club home page Giter Club logo

yozuch's People

Contributors

akrylysov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

yozuch's Issues

OSError when shutting down the server

In general, yozuch runs great on my system (Linux i386, python 3.5.7) but when I try to shut down the server, I get this error message (first 2 lines for normal operation):

127.0.0.1 - - [07/Apr/2019 18:33:34] "GET /css/pygments.css HTTP/1.1" 200 -
127.0.0.1 - - [07/Apr/2019 18:33:34] "GET /images/python-powered-w-200x80.png HTTP/1.1" 200 -
^C[   INFO] Shutting down server...
Exception in thread Thread-12:
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.5/site-packages/yozuch/notification_server.py", line 89, in start
    client, _ = self._socket.accept()
  File "/usr/local/lib/python3.5/socket.py", line 195, in accept
    fd, addr = self._accept()
OSError: [Errno 9] Bad file descriptor

lots of "Type str doesn't support the buffer API" errors

e.g.:

D:\src\html>cd devblog

D:\src\html\devblog>yozuch serve
[ INFO] Loaded 1 posts
[ INFO] Loaded 1 documents
[ INFO] Processing assets directory D:\src\html\devblog\assets...
[ INFO] Processing assets directory C:\Python34\lib\site-packages\yozuch\theme
s\foundation\assets...
[ INFO] Found 1 tags
[ INFO] Writing content...
[ INFO] Done!
[ INFO] Watching D:\src\html\devblog\documents for changes...
[ INFO] Watching D:\src\html\devblog\posts for changes...
[ INFO] Watching D:\src\html\devblog\templates for changes...
[ INFO] Watching D:\src\html\devblog\assets for changes...
[ INFO] Watching config.py for changes...
[ INFO] Serving content at port 8000
[ INFO] Auto reload server at port 8001
[ INFO] Press "Ctrl+C" to exit
127.0.0.1 - - [06/Jan/2016 12:37:00] "GET / HTTP/1.1" 200 -

127.0.0.1 - - [06/Jan/2016 12:37:00] "GET /css/foundation.min.css HTTP/1.1" 200

127.0.0.1 - - [06/Jan/2016 12:37:00] "GET /css/yozuch.css HTTP/1.1" 200 -
127.0.0.1 - - [06/Jan/2016 12:37:00] "GET /css/pygments.css HTTP/1.1" 200 -
127.0.0.1 - - [06/Jan/2016 12:37:01] code 404, message File not found
127.0.0.1 - - [06/Jan/2016 12:37:01] "GET /favicon.ico HTTP/1.1" 404 -
127.0.0.1 - - [06/Jan/2016 12:37:01] code 404, message File not found
127.0.0.1 - - [06/Jan/2016 12:37:01] "GET /favicon.ico HTTP/1.1" 404 -
Exception in thread Thread-8:
Traceback (most recent call last):
File "C:\Python34\lib\threading.py", line 920, in _bootstrap_inner
self.run()
File "C:\Python34\lib\threading.py", line 868, in run
self._target(_self._args, *_self._kwargs)
File "C:\Python34\lib\site-packages\yozuch\notification_server.py", line 46, i
n _handle_client
if self._handshake(client):
File "C:\Python34\lib\site-packages\yozuch\notification_server.py", line 36, i
n _handshake
headers = self._parse_headers(data)
File "C:\Python34\lib\site-packages\yozuch\notification_server.py", line 28, i
n _parse_headers
parts = line.split(': ', 2)
TypeError: Type str doesn't support the buffer API

127.0.0.1 - - [06/Jan/2016 12:37:10] "GET /blog/2016/01/06/demo-post/ HTTP/1.1"
200 -

127.0.0.1 - - [06/Jan/2016 12:37:10] "GET /css/foundation.min.css HTTP/1.1" 200

127.0.0.1 - - [06/Jan/2016 12:37:10] "GET /css/yozuch.css HTTP/1.1" 200 -
127.0.0.1 - - [06/Jan/2016 12:37:10] "GET /css/pygments.css HTTP/1.1" 200 -
Exception in thread Thread-11:
Traceback (most recent call last):
File "C:\Python34\lib\threading.py", line 920, in _bootstrap_inner
self.run()
File "C:\Python34\lib\threading.py", line 868, in run
self._target(_self._args, *_self._kwargs)
File "C:\Python34\lib\site-packages\yozuch\notification_server.py", line 46, i
n _handle_client
if self._handshake(client):
File "C:\Python34\lib\site-packages\yozuch\notification_server.py", line 36, i
n _handshake
headers = self._parse_headers(data)
File "C:\Python34\lib\site-packages\yozuch\notification_server.py", line 28, i
n _parse_headers
parts = line.split(': ', 2)
TypeError: Type str doesn't support the buffer API

WinError 10038

  1. in terminal (aka DOS prompt): "yozuch serve" (following the getting started instrux, default blog)
  2. use firefox to view blog, default sample post (localhost:8000)
  3. in terminal: press Ctrl-C

[ INFO] Shutting down server...
Exception in thread Thread-7:
Traceback (most recent call last):
File "C:\Python34\lib\threading.py", line 920, in _bootstrap_inner
self.run()
File "C:\Python34\lib\threading.py", line 868, in run
self._target(_self._args, *_self._kwargs)
File "C:\Python34\lib\site-packages\yozuch\notification_server.py", line 86,
n start
client, _ = self._socket.accept()
File "C:\Python34\lib\socket.py", line 184, in accept
fd, addr = self._accept()
OSError: [WinError 10038] An operation was attempted on something that is not a
socket

Base URL

The pages in the production output have 2 properties:

  1. They use absolute links, and
  2. They don't set the base URL in the meta tags.

This is a really unfortunate combination, because it means I can't serve the result from a place that isn't the website root. Such as http://example.com/~myusername/ .

I'd prefer relative links in any case, but I can live with absolute links provided the base URL is set. What is the URL variable from config.py used for, anyway?

templates?

Hi, I don't understand how to use the template directory. I mean, I know about Jinja, but how are they actually connected to the posts?

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.