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

Create _posts directory if it doesn't exist #14

Open
greenberga opened this issue May 23, 2023 · 0 comments
Open

Create _posts directory if it doesn't exist #14

greenberga opened this issue May 23, 2023 · 0 comments

Comments

@greenberga
Copy link
Owner

Will fix the problem where if all the files in the _posts folder are removed from version control, the folder itself disappears and causes the server to error.

[ERROR] (root) [Errno 2] No such file or directory: '/home/user/blog/_posts'
Traceback (most recent call last):
  File "/home/user/uploader/server.py", line 342, in upload
    new_oid = get_new_oid()
              ^^^^^^^^^^^^^
  File "/home/user/uploader/server.py", line 63, in get_new_oid
    posts = listdir(join(blog_path, '_posts'))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/user/blog/_posts'
127.0.0.1 - - [22/May/2023 23:42:56] "POST /upload HTTP/1.1" 500 740
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

1 participant