dtinit / portmap

A structured search frontend for portability articles to help people find solutions and help us learn about needs
https://portmap.dtinit.org
Other
2 stars 0 forks source link

Populate articles error #38

Closed lisad closed 6 months ago

lisad commented 8 months ago

Screenshot 2024-02-26 at 2 37 15 PM

Screenshot 2024-02-26 at 2 37 32 PM

This only affects the admin right now but eventually we do need to get our articles updated... and I confirmed that the articles do not get updated when this error shows.

I did not get around to looking at the server error logs, it could be an access key for GitHub API access or something like that

lisad commented 8 months ago

I can also reproduce an error on localhost so maybe it's not an access key:


[22:51:57] ERROR    Internal Server Error: /dj-admin/core/article/populate/                                                                                                 log.py:241
                    Traceback (most recent call last):
                      File "/Users/lisa/dev/portmap/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner
                        response = get_response(request)
                                   ^^^^^^^^^^^^^^^^^^^^^
                      File "/Users/lisa/dev/portmap/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response
                        response = wrapped_callback(request, *callback_args, **callback_kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "/Users/lisa/dev/portmap/venv/lib/python3.11/site-packages/django/utils/decorators.py", line 134, in _wrapper_view
                        response = view_func(request, *args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "/Users/lisa/dev/portmap/venv/lib/python3.11/site-packages/django/views/decorators/cache.py", line 62, in _wrapper_view_func
                        response = view_func(request, *args, **kwargs)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "/Users/lisa/dev/portmap/venv/lib/python3.11/site-packages/django/contrib/admin/sites.py", line 242, in inner
                        return view(request, *args, **kwargs)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "/Users/lisa/dev/portmap/portmap/core/admin.py", line 34, in populate
                        get_content_files()
                      File "/Users/lisa/dev/portmap/portmap/core/articles.py", line 15, in get_content_files
                        yaml_header, body = extract_yaml_and_body(article_content)
                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                      File "/Users/lisa/dev/portmap/portmap/utils.py", line 22, in extract_yaml_and_body
                        assert has_yaml_header(file_content)
                    AssertionError
           ERROR    "GET /dj-admin/core/article/populate/ HTTP/1.1" 500 124714                                                                                         basehttp.py:212
alexbainter commented 6 months ago

@aaronjae22 Do you know if this can be closed?

aaronjae22 commented 6 months ago

Yes, it's done. 👍🏼